jwalton512 / vim-blade

Vim syntax highlighting for Blade templates.
225 stars 37 forks source link

Test case idea #13

Closed tremby closed 10 years ago

tremby commented 10 years ago

Highlighting plugins seem like the kind of project which could really use test cases since I imagine they're pretty susceptible to regressions.

I figure it might be pretty easy to build a test case for a current version by using the :TOhtml function in vim and dumping that in a file, then the test case can check the current output against the saved. Once satisfied that a new change doesn't regress anything, the new test blade code is added and the HTML regenerated.

Just an idea.

jwalton512 commented 10 years ago

This sounds like a great idea. I have been pestering #vim about a way to do this. Will explore your idea. Thanks!

tremby commented 10 years ago

Happy to help. Since writing that I realized the test cases could also be atomic. Just need the input and output for each snippet. It might be worth also having a screenshot of each one (though that isn't exactly space efficient) too since it may not be obvious what is wrong when a messy HTML diff says they're not the same.

tremby commented 10 years ago

And obviously the test harness would load vim (headless if possible) with its own vimrc, not the system/user dependent one. Particular (default probably) colour scheme, somehow making sure maximal features are enabled (256 colour). Ideally it wouldn't require gvim but maybe it'd be necessary.

jwalton512 commented 10 years ago

so did some digging around at some existing vim testing frameworks (vroom, etc).

came across syntax checker

reading up on it now -- might be just the ticket.

tremby commented 10 years ago

Looks great.

jwalton512 commented 10 years ago

Didn't seem to work lol

On Wednesday, March 5, 2014, Bart Nagel notifications@github.com wrote:

Looks great.

Reply to this email directly or view it on GitHubhttps://github.com/xsbeats/vim-blade/issues/13#issuecomment-36793113 .

tremby commented 10 years ago

Works for me. See PR.