summaryrefslogtreecommitdiff
path: root/tests/head
diff options
context:
space:
mode:
Diffstat (limited to 'tests/head')
-rw-r--r--tests/head/Test.pm108
-rw-r--r--tests/head/in15
-rw-r--r--tests/head/in-102413
3 files changed, 0 insertions, 136 deletions
diff --git a/tests/head/Test.pm b/tests/head/Test.pm
deleted file mode 100644
index ebe573515..000000000
--- a/tests/head/Test.pm
+++ /dev/null
@@ -1,108 +0,0 @@
-# Test "head".
-
-# Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2005 Free Software
-# Foundation, Inc.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-package Test;
-require 5.002;
-use strict;
-
-my @tv = (
-# test name, options, input, expected output, expected return code
-#
-['idem-0', '', "", "", 0],
-['idem-1', '', "a", "a", 0],
-['idem-2', '', "\n", "\n", 0],
-['idem-3', '', "a\n", "a\n", 0],
-
-['basic-0-10', '',
- "1\n2\n3\n4\n5\n6\n7\n8\n9\n0\n",
- "1\n2\n3\n4\n5\n6\n7\n8\n9\n0\n", 0],
-
-['basic-0-09', '',
- "1\n2\n3\n4\n5\n6\n7\n8\n9\n",
- "1\n2\n3\n4\n5\n6\n7\n8\n9\n", 0],
-
-['basic-0-11', '',
- "1\n2\n3\n4\n5\n6\n7\n8\n9\n0\nb\n",
- "1\n2\n3\n4\n5\n6\n7\n8\n9\n0\n", 0],
-
-['obs-0', '-1', "1\n2\n", "1\n", 0],
-['obs-1', '-1c', "", "", 0],
-['obs-2', '-1c', "12", "1", 0],
-['obs-3', '-14c', "1234567890abcdefg", "1234567890abcd", 0],
-['obs-4', '-2b', [\'in'], [\'in-1024'], 0],
-['obs-5', '-1k', [\'in'], [\'in-1024'], 0],
-
-# This test fails for textutils-1.22, because head let 4096m overflow to 0
-# and did not fail. Now head fails with a diagnostic.
-
-# Disable this test because it fails on systems with 64-bit longs.
-# ['fail-0', '-n 4096m', "a\n", "", 1],
-
-# In spite of its name, this test passes -- just to contrast with the above.
-['fail-1', '-n 2048m', "a\n", "a\n", 0],
-
-# Make sure we don't break like AIX 4.3.1 on files with \0 in them.
-['null-1', '', "a\0a\n", "a\0a\n", 0],
-
-# Make sure counts are interpreted as decimal.
-# Before 2.0f, these would have been interpreted as octal
-['no-oct-1', '-08', "\n"x12, "\n"x8, 0],
-['no-oct-2', '-010', "\n"x12, "\n"x10, 0],
-['no-oct-3', '-n 08', "\n"x12, "\n"x8, 0],
-['no-oct-4', '-c 08', "\n"x12, "\n"x8, 0],
-
-);
-
-sub test_vector
-{
- my @derived_tests;
- foreach my $t (@tv)
- {
- my ($test_name, $flags, $in, $exp, $ret) = @$t;
-
- # Derive equivalent, posix-style tests from the obsolescent ones.
- next if $test_name !~ /^obs-/;
-
- $test_name =~ s/^obs-/posix-/;
- if ($flags =~ /-(\d+)$/)
- {
- $flags = "-n $1";
- }
- elsif ($flags =~ /-(\d+)([cbk])$/)
- {
- my $suffix = $2;
- $suffix = '' if $suffix eq 'c';
- $flags = "-c $1$suffix";
- }
- else
- {
- $flags = "-l $`";
- }
- push (@derived_tests, [$test_name, $flags, $in, $exp, $ret]);
- }
-
- foreach my $t (@tv, @derived_tests)
- {
- my ($test_name) = @$t;
- $Test::input_via{$test_name} = {REDIR => 0, FILE => 0, PIPE => 0}
- }
-
- return (@tv, @derived_tests);
-}
-
-1;
diff --git a/tests/head/in b/tests/head/in
deleted file mode 100644
index d5b2b7566..000000000
--- a/tests/head/in
+++ /dev/null
@@ -1,15 +0,0 @@
-8ca240627bbeaa9066aa9ba0ce6de080db8d19a6e26c423663c7a6e0185207841a467de16d80db
-c5a4a1ee35a8b13d4cc26cb47e05686db78cc71bc8c1e0769245988dd58d03974600b59872857c
-934cd484c093949db0676a3ac679a8bae4d41256959874c02ab792cb42ca33de72469a69d521aa
-060877520abad96725a85ace28072cd566b5b189e58331288d92e601c393ddad1eb60cddc46bb7
-4b7666dd9b8c36688cd3d0e6c4b091c5c6926b4468b19a40018d655d1840ed11da6a360bdc0e3c
-75355ad402c13a9c49228e11980eadb65a32070c1716b07074422534029bc6941981e65ae774e7
-6762616d66391aa2be539d2c2853e324429859ca998410ee54cc1521001804e5811bde40439d29
-bc8a304a58b823a69d1a2d5351993d1642b17398c031c8b7e78b451735e6326bb949141d3d5736
-2b03ad03c1ab427076be6e785722a18cc6846248e6b35483ec3aa85b2ae22bbb6e2919686a5a95
-a71785d1e1e12e1412cb14334dc7a591b83ed785474132993e69377ac4c1747a0db2a8cb1811ac
-722e7aa3e5c3d21c885bc6eeb2b0eb502476abe2d77691ce42587dd0934b44b568d2b113e12a39
-eb1853ec3a5c9ed7321b127422da35451a2e289c09ed2b19857922099275a0dd14ba2487180a85
-8d5e9796ad1c5c44d3a910a7623363718684b667a48a26e3ad85b008ce5a20e94ebe57da18edc6
-b661009a8a113ed6a922840da8d51c13ca4973b9a76dc05c142496c3083adcd8ba24686b471a77
-77ca4bb8
diff --git a/tests/head/in-1024 b/tests/head/in-1024
deleted file mode 100644
index 448aeaa6b..000000000
--- a/tests/head/in-1024
+++ /dev/null
@@ -1,13 +0,0 @@
-8ca240627bbeaa9066aa9ba0ce6de080db8d19a6e26c423663c7a6e0185207841a467de16d80db
-c5a4a1ee35a8b13d4cc26cb47e05686db78cc71bc8c1e0769245988dd58d03974600b59872857c
-934cd484c093949db0676a3ac679a8bae4d41256959874c02ab792cb42ca33de72469a69d521aa
-060877520abad96725a85ace28072cd566b5b189e58331288d92e601c393ddad1eb60cddc46bb7
-4b7666dd9b8c36688cd3d0e6c4b091c5c6926b4468b19a40018d655d1840ed11da6a360bdc0e3c
-75355ad402c13a9c49228e11980eadb65a32070c1716b07074422534029bc6941981e65ae774e7
-6762616d66391aa2be539d2c2853e324429859ca998410ee54cc1521001804e5811bde40439d29
-bc8a304a58b823a69d1a2d5351993d1642b17398c031c8b7e78b451735e6326bb949141d3d5736
-2b03ad03c1ab427076be6e785722a18cc6846248e6b35483ec3aa85b2ae22bbb6e2919686a5a95
-a71785d1e1e12e1412cb14334dc7a591b83ed785474132993e69377ac4c1747a0db2a8cb1811ac
-722e7aa3e5c3d21c885bc6eeb2b0eb502476abe2d77691ce42587dd0934b44b568d2b113e12a39
-eb1853ec3a5c9ed7321b127422da35451a2e289c09ed2b19857922099275a0dd14ba2487180a85
-8d5e9796ad1c5c44d3a910a7623363718684b667a48a26e3ad85b008ce5a20e94ebe57da18ed \ No newline at end of file