This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/Users/sf/tools/rakudo/perl6 | |
use v6; | |
use Test; | |
plan *; | |
run "rm as1-2092.step as1-A.step as1-B.step"; | |
{ | |
run "../step_extract.pl as1-tc-214.stp as1-2092.step 2092"; | |
my $results = qx{diff -w -B proper-as1-2092.step as1-2092.step}; | |
nok($results ~~ /\S+/, "Extracting styled_item using 2092"); | |
} | |
{ | |
run "../step_extract.pl as1-tc-214.stp as1-A.step 2092 2093 2094"; | |
run "../step_extract.pl as1-tc-214.stp as1-B.step 2092-2094"; | |
my $results = qx{diff -w -B as1-A.step as1-B.step}; | |
nok($results ~~ /\S+/, "Extracting 2092-2094"); | |
} |
Simple and short, but with it I learned a significant limitation of my STEP extract script and turned up a Rakudobug. All in all, a most successful first foray into testing Perl code.
Now all I need to do is figure out the proper directory structure, and how to automatically build a makefile with a "test" target, and get the hacked version of Test.pm which properly handles planless testing.
No comments:
Post a Comment