summaryrefslogtreecommitdiff
path: root/tests/head/Test.pm
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1997-07-10 15:26:51 +0000
committerJim Meyering <jim@meyering.net>1997-07-10 15:26:51 +0000
commitdeb5b314a5e11a8e1d3231f88fddec11a1c3a486 (patch)
tree35137028ca57fb2fe7d97adf03e54707a1c3ce12 /tests/head/Test.pm
parentc23aa46af63f50f24661dbbe2a73f0c5a82bea69 (diff)
downloadcoreutils-deb5b314a5e11a8e1d3231f88fddec11a1c3a486.tar.xz
.
Diffstat (limited to 'tests/head/Test.pm')
-rw-r--r--tests/head/Test.pm27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/head/Test.pm b/tests/head/Test.pm
new file mode 100644
index 000000000..729795609
--- /dev/null
+++ b/tests/head/Test.pm
@@ -0,0 +1,27 @@
+package Test;
+require 5.002;
+use strict;
+
+my @tv = (
+# test name, options, input, expected output, expected return code
+#
+['idem-1', '', "", "", 0],
+['idem-2', '', "a", "a\n", 0],
+['idem-3', '', "\n", "\n", 0],
+['idem-4', '', "a\n", "a\n", 0],
+
+);
+
+sub test_vector
+{
+ my $t;
+ foreach $t (@tv)
+ {
+ my ($test_name, $flags, $in, $exp, $ret) = @$t;
+ $Test::input_via{$test_name} = {REDIR => 0, FILE => 0, PIPE => 0}
+ }
+
+ return @tv;
+}
+
+1;