|
|
@ -24,7 +24,7 @@ program_version_ok('pg_bsd_indent'); |
|
|
|
|
|
|
|
|
|
|
|
# Run pg_bsd_indent on pre-fab test cases. |
|
|
|
# Run pg_bsd_indent on pre-fab test cases. |
|
|
|
# Any diffs in the generated files will be accumulated here. |
|
|
|
# Any diffs in the generated files will be accumulated here. |
|
|
|
my $diff_file = "tests.diff"; |
|
|
|
my $diffs_file = "test.diffs"; |
|
|
|
|
|
|
|
|
|
|
|
# Copy support files to current dir, so *.pro files don't need to know path. |
|
|
|
# Copy support files to current dir, so *.pro files don't need to know path. |
|
|
|
while (my $file = glob("$src_dir/tests/*.list")) |
|
|
|
while (my $file = glob("$src_dir/tests/*.list")) |
|
|
@ -44,9 +44,9 @@ while (my $test_src = glob("$src_dir/tests/*.0")) |
|
|
|
"$test.out", "-P$src_dir/tests/$test.pro" |
|
|
|
"$test.out", "-P$src_dir/tests/$test.pro" |
|
|
|
], |
|
|
|
], |
|
|
|
"pg_bsd_indent succeeds on $test"); |
|
|
|
"pg_bsd_indent succeeds on $test"); |
|
|
|
# check result matches, adding any diff to $diff_file |
|
|
|
# check result matches, adding any diff to $diffs_file |
|
|
|
my $result = run_log([ 'diff', '-upd', "$test_src.stdout", "$test.out" ], |
|
|
|
my $result = run_log([ 'diff', '-upd', "$test_src.stdout", "$test.out" ], |
|
|
|
'>>', $diff_file); |
|
|
|
'>>', $diffs_file); |
|
|
|
ok($result, "pg_bsd_indent output matches for $test"); |
|
|
|
ok($result, "pg_bsd_indent output matches for $test"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|