1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
#!/usr/bin/perl
#..do this to pick up TestTools.
BEGIN { unshift(@INC,"./test_data/"); }
use TestTools;
use strict;
# handle to test module, initialises some setup stuff.
my $test_handle = TestTools->new(tests_to_run => 4);
# use these to create output files to check.
# ..this is the to be tested version.
$test_handle->run_tested("< test.caf > test.out 2>/dev/null");
my(%installed,%tested);
$test_handle->read_template_output(\%installed,'../test_data/templates.out','Reading installed output');
$test_handle->read_template_output(\%tested,'test.out','Reading test output');
$test_handle->compare_output(\%installed,\%tested,'Comparing output lines');
exit;
END {
$test_handle->print_test_results();
}
|