$ runtests --execrc my_execrc t/ -q - < test_urls.txt t/10-stuff.....Failed 1/6 tests (less 2 skipped tests: 3 okay) (1 test unexpectedly succeeded) t/ruby.........ok http://www.google.com/....ok http://www.yahoo.com/.....ok Test Summary Report ------------------- t/10-stuff.t (Wstat: 256 Tests: 6 Failed: 1) Failed tests: 2 TODO passed: 6 Tests skipped: 3-4 Files=4, Tests=10, 2 wallclock secs ( 0.92 cusr + 0.23 csys = 1.15 CPU)
t/10-stuff.t is a normal Perl test.
t/ruby.t is a test written in Ruby (I did not include a shebang line in the Ruby test to demonstrate that you can run it anyway).
The two URLs are brand new tests that show we can even test the web with this new test framework. This is driven by the execrc file, though naturally this is for advanced users.
# This is the default for all files '/usr/bin/perl -wT' => '*' # whoops! Looks like a ruby test got in there '/usr/bin/ruby' => 't/ruby.t' # let's see if we can test fetching web pages! '/usr/bin/perl -w test_html.pl' => 'http://www.google.com/' '/usr/bin/perl -w test_html.pl' => 'http://www.yahoo.com/'
Eventually I'd like to add regex support, but for the time being, this will have to do.
Re:Variant testing ?
Ovid on 2007-01-06T20:51:04
No, nothing like that had occurred to me.
Re:Variant testing ?
oneiron on 2007-01-06T21:25:45
I agree this would be useful. In particular, historically, there have been quite a few perl bugs with taint mode where taint-safe code behaved differently when run in taint mode than when run without tainting. So, running a taint-safe test both with and without taint mode seems like a valuable, dare I say routine, test to perform.