jwalton512 / vim-blade

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

Add TOhtml-based testing #20

Closed tremby closed 8 years ago

tremby commented 10 years ago

How's this? It's a touch on the ghetto side but it works, at least for me.

Included is a nearly-blank vimrc file, and the user's is skipped.

One minor issue is I'm sourcing the syntax/blade.vim file from the vimrc but I seem to also have to do it when invoking vim on the commandline in the test.sh and the make-test-output.sh files, otherwise the syntax highlighting isn't loaded properly. Not sure why.

Anyway, it runs in dumb-terminal mode, loads a file, runs TOhtml, runs a bit of script to delete all but the meat, and then in the make-test-output script it saves as $bladefile.html.expected. The test script does a similar thing but runs commandline diff of expected vs actual output, and prints it to the console if diff exited with error status. The test script itself also exits with error status if at least one test was skipped (no expected output available) or failed.

jwalton512 commented 10 years ago

This seems awesome. On the road now, will check it out as soon as I get home.