diff options
author | Jim Meyering <jim@meyering.net> | 1996-12-20 06:09:45 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1996-12-20 06:09:45 +0000 |
commit | 81d1fa5cb682d3f24fbe88e65b5985f136b7677b (patch) | |
tree | c46813198d1de4bac65c8a42ca4ad5f08da5a1a4 /tests | |
parent | 421e75544b3cbdc56e0e34233b280cff5d9556ff (diff) | |
download | coreutils-81d1fa5cb682d3f24fbe88e65b5985f136b7677b.tar.xz |
New option: --list. Generate lists of files used/generated.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/cut/mk-script.pl | 29 | ||||
-rw-r--r-- | tests/head/mk-script.pl | 29 | ||||
-rw-r--r-- | tests/join/mk-script.pl | 29 | ||||
-rw-r--r-- | tests/ls/mk-script.pl | 29 |
4 files changed, 108 insertions, 8 deletions
diff --git a/tests/cut/mk-script.pl b/tests/cut/mk-script.pl index 93a7ae1b8..5f9c9af6a 100644 --- a/tests/cut/mk-script.pl +++ b/tests/cut/mk-script.pl @@ -117,13 +117,38 @@ sub spec_to_list ($$$) my $xx = $ARGV[0]; - if ($xx eq '--list-generated') + if ($xx eq '--list') { validate (); # FIXME !!!!!!!!!!!!!!!!!!!!!!!!!!!! - # Output two lists of files: + # Output three lists of files: + # EXPLICIT -- file names specified in Test.pm # MAINT_GEN -- maintainer-generated files # RUN_GEN -- files created when running the tests + my $test_vector; + my @exp; + my @maint; + my @run; + foreach $test_vector (@Test::t) + { + my ($test_name, $flags, $in_spec, $exp_spec, $e_ret_code) + = @{$test_vector}; + + push (@run, ("t$test_name.out", "t$test_name.err")); + + my $in = spec_to_list ($in_spec, $test_name, 'in'); + push (@exp, @{$in->{EXPLICIT}}); + push (@maint, @{$in->{MAINT_GEN}}); + + my $e = spec_to_list ($exp_spec, $test_name, 'exp'); + push (@exp, @{$e->{EXPLICIT}}); + push (@maint, @{$e->{MAINT_GEN}}); + } + + print 'explicit: ', join (' ', @exp), "\n"; + print 'maint-gen: ', join (' ', @maint), "\n"; + print 'run-gen: ', join (' ', @run), "\n"; + exit 0; } diff --git a/tests/head/mk-script.pl b/tests/head/mk-script.pl index 93a7ae1b8..5f9c9af6a 100644 --- a/tests/head/mk-script.pl +++ b/tests/head/mk-script.pl @@ -117,13 +117,38 @@ sub spec_to_list ($$$) my $xx = $ARGV[0]; - if ($xx eq '--list-generated') + if ($xx eq '--list') { validate (); # FIXME !!!!!!!!!!!!!!!!!!!!!!!!!!!! - # Output two lists of files: + # Output three lists of files: + # EXPLICIT -- file names specified in Test.pm # MAINT_GEN -- maintainer-generated files # RUN_GEN -- files created when running the tests + my $test_vector; + my @exp; + my @maint; + my @run; + foreach $test_vector (@Test::t) + { + my ($test_name, $flags, $in_spec, $exp_spec, $e_ret_code) + = @{$test_vector}; + + push (@run, ("t$test_name.out", "t$test_name.err")); + + my $in = spec_to_list ($in_spec, $test_name, 'in'); + push (@exp, @{$in->{EXPLICIT}}); + push (@maint, @{$in->{MAINT_GEN}}); + + my $e = spec_to_list ($exp_spec, $test_name, 'exp'); + push (@exp, @{$e->{EXPLICIT}}); + push (@maint, @{$e->{MAINT_GEN}}); + } + + print 'explicit: ', join (' ', @exp), "\n"; + print 'maint-gen: ', join (' ', @maint), "\n"; + print 'run-gen: ', join (' ', @run), "\n"; + exit 0; } diff --git a/tests/join/mk-script.pl b/tests/join/mk-script.pl index 93a7ae1b8..5f9c9af6a 100644 --- a/tests/join/mk-script.pl +++ b/tests/join/mk-script.pl @@ -117,13 +117,38 @@ sub spec_to_list ($$$) my $xx = $ARGV[0]; - if ($xx eq '--list-generated') + if ($xx eq '--list') { validate (); # FIXME !!!!!!!!!!!!!!!!!!!!!!!!!!!! - # Output two lists of files: + # Output three lists of files: + # EXPLICIT -- file names specified in Test.pm # MAINT_GEN -- maintainer-generated files # RUN_GEN -- files created when running the tests + my $test_vector; + my @exp; + my @maint; + my @run; + foreach $test_vector (@Test::t) + { + my ($test_name, $flags, $in_spec, $exp_spec, $e_ret_code) + = @{$test_vector}; + + push (@run, ("t$test_name.out", "t$test_name.err")); + + my $in = spec_to_list ($in_spec, $test_name, 'in'); + push (@exp, @{$in->{EXPLICIT}}); + push (@maint, @{$in->{MAINT_GEN}}); + + my $e = spec_to_list ($exp_spec, $test_name, 'exp'); + push (@exp, @{$e->{EXPLICIT}}); + push (@maint, @{$e->{MAINT_GEN}}); + } + + print 'explicit: ', join (' ', @exp), "\n"; + print 'maint-gen: ', join (' ', @maint), "\n"; + print 'run-gen: ', join (' ', @run), "\n"; + exit 0; } diff --git a/tests/ls/mk-script.pl b/tests/ls/mk-script.pl index 93a7ae1b8..5f9c9af6a 100644 --- a/tests/ls/mk-script.pl +++ b/tests/ls/mk-script.pl @@ -117,13 +117,38 @@ sub spec_to_list ($$$) my $xx = $ARGV[0]; - if ($xx eq '--list-generated') + if ($xx eq '--list') { validate (); # FIXME !!!!!!!!!!!!!!!!!!!!!!!!!!!! - # Output two lists of files: + # Output three lists of files: + # EXPLICIT -- file names specified in Test.pm # MAINT_GEN -- maintainer-generated files # RUN_GEN -- files created when running the tests + my $test_vector; + my @exp; + my @maint; + my @run; + foreach $test_vector (@Test::t) + { + my ($test_name, $flags, $in_spec, $exp_spec, $e_ret_code) + = @{$test_vector}; + + push (@run, ("t$test_name.out", "t$test_name.err")); + + my $in = spec_to_list ($in_spec, $test_name, 'in'); + push (@exp, @{$in->{EXPLICIT}}); + push (@maint, @{$in->{MAINT_GEN}}); + + my $e = spec_to_list ($exp_spec, $test_name, 'exp'); + push (@exp, @{$e->{EXPLICIT}}); + push (@maint, @{$e->{MAINT_GEN}}); + } + + print 'explicit: ', join (' ', @exp), "\n"; + print 'maint-gen: ', join (' ', @maint), "\n"; + print 'run-gen: ', join (' ', @run), "\n"; + exit 0; } |