Next | Program Repair Shop | 224 |
Here's what I used
First, I made a record of what the output was supposed to look like:
perl extract1.pl mv OUT.out SAMPLE-OUTPUT
Then I wrote test.pl:
#!/usr/bin/perl
my $prog = shift || 'extract3.pl'; chdir("/home/mjd/TPC/2002/Flags/extract") or die $!; system("perl $prog"); system("cmp -s SAMPLE-OUTPUT OUT.out"); print $? == 0 ? "ok\n" : "not ok\n";
After each change, run test.pl
If it says not ok, examine OUT.out to see what is wrong
Isn't that simple?
Next | Copyright © 2002 M. J. Dominus |