diff options
author | Jim Meyering <jim@meyering.net> | 1998-08-15 21:39:17 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1998-08-15 21:39:17 +0000 |
commit | 49d59ad66bf7ca9b071d6a32b8d5616a1cb31b5c (patch) | |
tree | 0fb34fa63b24d8498ccbe75f169a11c32d381b8b /tests/ls-2/T.pm | |
parent | c2bbdeab6d408d497485991d3930db729c16ef3d (diff) | |
download | coreutils-49d59ad66bf7ca9b071d6a32b8d5616a1cb31b5c.tar.xz |
*** empty log message ***
Diffstat (limited to 'tests/ls-2/T.pm')
-rw-r--r-- | tests/ls-2/T.pm | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/ls-2/T.pm b/tests/ls-2/T.pm index 6c8fa0d08..b54d2b4e2 100644 --- a/tests/ls-2/T.pm +++ b/tests/ls-2/T.pm @@ -15,6 +15,34 @@ my @Types = qw (IN OUT ERR EXIT); my %Types = map {$_ => 1} @Types; my %Zero_one_type = map {$_ => 1} qw (OUT ERR EXIT); +# A file spec: a scalar or a reference to a single-keyed hash +# ================ +# 'contents' contents only (file name is derived from test name) +# {filename => 'contents'} filename and contents +# {filename => undef} filename only -- $(srcdir)/filename must exist +# (FIXME: note to self: get $srcdir from ENV) +# +# FIXME: If there is more than one input file, the you can't specify REDIRECT. +# PIPE is still ok. +# +# I/O spec: a hash ref with the following properties +# ================ +# - one key/value pair +# - the key must be one of these strings: IN, OUT, ERR, EXIT +# - the value must be a file spec +# {OUT => 'data'} put data in a temp file and compare it to stdout from cmd +# {OUT => {'filename'=>undef}} compare contents of existing filename to +# stdout from cmd +# Ditto for `ERR', but compare with stderr +# {EXIT => N} expect exit status of cmd to be N +# +# There may be many input file specs. File names from the input specs +# are concatenated in order on the command line. +# There may be at most one of the OUT-, ERR-, and EXIT-keyed specs. +# If the OUT-(or ERR)-keyed hash ref is omitted, then expect no output +# on stdout (or stderr). +# If the EXIT-keyed one is omitted, then expect the exit status to be zero. + my $Global_count = 1; sub _create_file ($$$$$) |