summaryrefslogtreecommitdiff
path: root/tests/test/Test.pm
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1998-06-07 13:56:20 +0000
committerJim Meyering <jim@meyering.net>1998-06-07 13:56:20 +0000
commit94ff35fc2ddd62125303d8f12b6eeb1350f69167 (patch)
treecea26ffe5d9d3265fdf22ef700312ea3bf3d53c2 /tests/test/Test.pm
parentdc6658157ddacf7867f8fbf58d86ad01b208121c (diff)
downloadcoreutils-94ff35fc2ddd62125303d8f12b6eeb1350f69167.tar.xz
.
Diffstat (limited to 'tests/test/Test.pm')
-rw-r--r--tests/test/Test.pm39
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/test/Test.pm b/tests/test/Test.pm
new file mode 100644
index 000000000..3f739d41c
--- /dev/null
+++ b/tests/test/Test.pm
@@ -0,0 +1,39 @@
+# -*-perl-*-
+package Test;
+require 5.002;
+use strict;
+
+# For each test...
+# Export LANG=C so that the locale-dependent strings match.
+# Export TZ=UTC so that zone-dependent strings match.
+$Test::env_default = ['LANG=C TZ=UTC'];
+
+sub test_vector
+{
+ my @tvec =
+ (
+ # test-name options input expected-output expected-return-code
+ #
+ ['1a', '', {}, '', 1],
+ ['1b', "-z ''", {}, '', 0],
+ ['1c', 'any-string', {}, '', 0],
+ ['1d', '-n any-string', {}, '', 0],
+
+ ['and-1', 't -a t', {}, '', 0],
+ ['and-2', '"" -a t', {}, '', 1],
+ ['and-3', 't -a ""', {}, '', 1],
+ ['and-4', '"" -a ""', {}, '', 1],
+
+ ['or-1', 't -o t', {}, '', 0],
+ ['or-2', '"" -o t', {}, '', 0],
+ ['or-3', 't -o ""', {}, '', 0],
+ ['or-4', '"" -o ""', {}, '', 1],
+
+ ['t1', "-t", {}, '', 1],
+ ['t2', "-t 1", {}, '', 1],
+ );
+
+ return @tvec;
+}
+
+1;