<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>literal thoughts &#187; vim</title>
	<atom:link href="http://blog.nix.is/tag/vim/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.nix.is</link>
	<description>Come for the thoughts, stay for the rants</description>
	<lastBuildDate>Tue, 01 Sep 2009 13:15:05 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Testing vim syntax files</title>
		<link>http://blog.nix.is/testing-vim-syntax-files</link>
		<comments>http://blog.nix.is/testing-vim-syntax-files#comments</comments>
		<pubDate>Tue, 01 Sep 2009 13:13:04 +0000</pubDate>
		<dc:creator>Hinrik Örn Sigurðsson</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[perl6]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://blog.nix.is/?p=343</guid>
		<description><![CDATA[Yesterday, Andy Lester opened an issue for vim-perl on github about adding an automated test suite. I&#8217;ve thought about doing something like this before, so last night got busy with prototyping a test harness.
What I&#8217;ve got so far (in my fork) is a test file that uses Text::VimColor to generate HTML and compare it against [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday, Andy Lester opened an <a href="http://github.com/petdance/vim-perl/issues#issue/15">issue</a> for vim-perl on github about adding an automated test suite. I&#8217;ve thought about doing something like this before, so last night got busy with prototyping a test harness.</p>
<p>What I&#8217;ve got so far (in <a href="https://github.com/hinrik/vim-perl/tree">my fork</a>) is a test file that uses <code>Text::VimColor</code> to generate HTML and compare it against a reference HTML document to determine if the syntax file is doing its job. If a reference file can&#8217;t be found, it will create it and <code>skip</code> that test. Here&#8217;s what it looks like:</p>
<pre>
$ make test
prove -rv t
t/01_highlighting.t ..
ok 1 - Correct output for t_source/perl/basic.t
ok 2 # skip Created t_source/perl/advanced.t.html
ok 3 - Correct output for t_source/perl6/basic.t
1..3
ok
All tests successful.
</pre>
<p>In case of failure, it will use <code>Test::Differences</code> to show you what&#8217;s wrong, and write the incorrect output to disk for you to inspect:</p>
<pre>
$ vim syntax/perl6.vim # make a bad change
$ make test
prove -rv t
t/01_highlighting.t ..
ok 1 - Correct output for t_source/perl/basic.t
ok 2 - Correct output for t_source/perl/advanced.t
not ok 3 - Correct output for t_source/perl6/basic.t

#   Failed test 'Correct output for t_source/perl6/basic.t'
#   at t/01_highlighting.t line 77.
#
«output from Test::Differences showing the offending lines»
# You can inspect the incorrect output at t_source/perl6/basic.t_fail.html
1..3
# Looks like you failed 1 test of 3.
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/3 subtests
</pre>
<p>The only big downside to this is that <code>01_highlighting.t</code> tests all the source files in one go. You currently can&#8217;t tell it to only test one specific file.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nix.is/testing-vim-syntax-files/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
