summaryrefslogtreecommitdiff
path: root/tests/join
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1996-12-22 14:04:47 +0000
committerJim Meyering <jim@meyering.net>1996-12-22 14:04:47 +0000
commitdcd02c800890e720b5c000c2b6b3ee3e01a581f7 (patch)
tree5175f1693cd6a76d69ad909c7b46e628da9d60ff /tests/join
parenta80c49322b9d0424dd8693b21858673bb2688031 (diff)
downloadcoreutils-dcd02c800890e720b5c000c2b6b3ee3e01a581f7.tar.xz
Use test_vector, not array @t.
Diffstat (limited to 'tests/join')
-rw-r--r--tests/join/mk-script.pl17
1 files changed, 10 insertions, 7 deletions
diff --git a/tests/join/mk-script.pl b/tests/join/mk-script.pl
index 708a3cb57..20d617cb7 100644
--- a/tests/join/mk-script.pl
+++ b/tests/join/mk-script.pl
@@ -13,11 +13,14 @@ sub validate
{
my %seen;
my $test_vector;
- foreach $test_vector (@Test::t)
+ foreach $test_vector (Test::test_vector ())
{
my ($test_name, $flags, $in_spec, $expected, $e_ret_code, $rest) =
- @{$test_vector};
- assert (defined $e_ret_code && !defined $rest);
+ @$test_vector;
+ if (!defined $e_ret_code || defined $rest)
+ {
+ die "wrong number of elements in test $test_name\n";
+ }
assert (!ref $test_name);
assert (!ref $flags);
assert (!ref $expected);
@@ -150,10 +153,10 @@ sub wrap
my @exp;
my @maint;
my @run;
- foreach $test_vector (@Test::t)
+ foreach $test_vector (Test::test_vector ())
{
my ($test_name, $flags, $in_spec, $exp_spec, $e_ret_code)
- = @{$test_vector};
+ = @$test_vector;
push (@run, ("t$test_name.out", "t$test_name.err"));
@@ -191,10 +194,10 @@ EOF
validate ();
my $test_vector;
-foreach $test_vector (@Test::t)
+foreach $test_vector (Test::test_vector ())
{
my ($test_name, $flags, $in_spec, $exp_spec, $e_ret_code)
- = @{$test_vector};
+ = @$test_vector;
my $in = spec_to_list ($in_spec, $test_name, 'in');