summaryrefslogtreecommitdiff
path: root/tests/ls
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1996-12-20 06:09:45 +0000
committerJim Meyering <jim@meyering.net>1996-12-20 06:09:45 +0000
commit81d1fa5cb682d3f24fbe88e65b5985f136b7677b (patch)
treec46813198d1de4bac65c8a42ca4ad5f08da5a1a4 /tests/ls
parent421e75544b3cbdc56e0e34233b280cff5d9556ff (diff)
downloadcoreutils-81d1fa5cb682d3f24fbe88e65b5985f136b7677b.tar.xz
New option: --list. Generate lists of files used/generated.
Diffstat (limited to 'tests/ls')
-rw-r--r--tests/ls/mk-script.pl29
1 files changed, 27 insertions, 2 deletions
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;
}