summaryrefslogtreecommitdiff
path: root/tests/misc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/misc')
-rw-r--r--tests/misc/Makefile.am20
-rwxr-xr-xtests/misc/base6417
-rwxr-xr-xtests/misc/basename17
-rwxr-xr-xtests/misc/cat-proc17
-rwxr-xr-xtests/misc/close-stdout17
-rwxr-xr-xtests/misc/csplit18
-rwxr-xr-xtests/misc/date18
-rwxr-xr-xtests/misc/date-sec17
-rwxr-xr-xtests/misc/df17
-rwxr-xr-xtests/misc/dirname18
-rwxr-xr-xtests/misc/expand17
-rwxr-xr-xtests/misc/false-status17
-rwxr-xr-xtests/misc/fold17
-rwxr-xr-xtests/misc/head-c19
-rwxr-xr-xtests/misc/head-elide-tail17
-rwxr-xr-xtests/misc/head-pos17
-rwxr-xr-xtests/misc/mknod17
-rwxr-xr-xtests/misc/nice19
-rwxr-xr-xtests/misc/nl17
-rwxr-xr-xtests/misc/nohup17
-rwxr-xr-xtests/misc/paste-no-nl17
-rwxr-xr-xtests/misc/pathchk117
-rwxr-xr-xtests/misc/printf17
-rwxr-xr-xtests/misc/printf-hex17
-rwxr-xr-xtests/misc/pwd-long18
-rwxr-xr-xtests/misc/sha224sum18
-rwxr-xr-xtests/misc/sha256sum18
-rwxr-xr-xtests/misc/sha384sum18
-rwxr-xr-xtests/misc/sha512sum18
-rwxr-xr-xtests/misc/shuf17
-rwxr-xr-xtests/misc/sort-merge18
-rwxr-xr-xtests/misc/sort-rand17
-rwxr-xr-xtests/misc/split-a17
-rwxr-xr-xtests/misc/split-fail17
-rwxr-xr-xtests/misc/split-l17
-rwxr-xr-xtests/misc/stat-fmt17
-rwxr-xr-xtests/misc/stat-printf18
-rwxr-xr-xtests/misc/tac-continue17
-rwxr-xr-xtests/misc/test-diag18
-rwxr-xr-xtests/misc/tty-eof18
-rwxr-xr-xtests/misc/wc-files017
-rwxr-xr-xtests/misc/wc-files0-from17
42 files changed, 731 insertions, 2 deletions
diff --git a/tests/misc/Makefile.am b/tests/misc/Makefile.am
index 5c01b43b4..8ff26e720 100644
--- a/tests/misc/Makefile.am
+++ b/tests/misc/Makefile.am
@@ -1,4 +1,22 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
+# Make miscellaneous coreutils tests. -*-Makefile-*-
+
+# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
EXTRA_DIST = $(TESTS)
diff --git a/tests/misc/base64 b/tests/misc/base64
index 11cae87c1..02591da86 100755
--- a/tests/misc/base64
+++ b/tests/misc/base64
@@ -2,6 +2,23 @@
# -*- perl -*-
# Exercise base64.
+# Copyright (C) 2006 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/misc/basename b/tests/misc/basename
index 490ad3952..89d96ff02 100755
--- a/tests/misc/basename
+++ b/tests/misc/basename
@@ -1,6 +1,23 @@
#!/bin/sh
# -*-perl-*-
+# Copyright (C) 2006 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/misc/cat-proc b/tests/misc/cat-proc
index b53864ef5..d6ff5011b 100755
--- a/tests/misc/cat-proc
+++ b/tests/misc/cat-proc
@@ -2,6 +2,23 @@
# Ensure that cat -E produces same output as cat, module `$'s,
# even when applied to a file in /proc.
+# Copyright (C) 2006 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
cat --version
diff --git a/tests/misc/close-stdout b/tests/misc/close-stdout
index 42cd92c65..a232fd746 100755
--- a/tests/misc/close-stdout
+++ b/tests/misc/close-stdout
@@ -2,6 +2,23 @@
# Ensure that several programs work fine, even with stdout initially closed.
# This is effectively a test of closeout.c's close_stdout function.
+# Copyright (C) 2004, 2006 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
rm --version
diff --git a/tests/misc/csplit b/tests/misc/csplit
index 81a98afa5..1feea6645 100755
--- a/tests/misc/csplit
+++ b/tests/misc/csplit
@@ -1,6 +1,24 @@
#!/bin/sh
# various csplit tests
+# Copyright (C) 2001, 2002, 2003, 2004, 2005 2006 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
csplit --version
diff --git a/tests/misc/date b/tests/misc/date
index 56577b34b..b9b253df3 100755
--- a/tests/misc/date
+++ b/tests/misc/date
@@ -1,4 +1,22 @@
#!/bin/sh
+# Test "date".
+
+# Copyright (C) 2005, 2006 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/misc/date-sec b/tests/misc/date-sec
index b296b7ea6..aac1e0a98 100755
--- a/tests/misc/date-sec
+++ b/tests/misc/date-sec
@@ -3,6 +3,23 @@
# `date --date="21:04 +0100" +%S' always prints `00'.
# Before coreutils-5.2.1, it would print the seconds from the current time.
+# Copyright (C) 2004 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
date --version
diff --git a/tests/misc/df b/tests/misc/df
index b1efe61ab..31040ca96 100755
--- a/tests/misc/df
+++ b/tests/misc/df
@@ -1,6 +1,23 @@
#!/bin/sh
# Ensure that "df ." outputs a header.
+# Copyright (C) 2006 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
df --version
diff --git a/tests/misc/dirname b/tests/misc/dirname
index 63006ee2c..c217d9ab4 100755
--- a/tests/misc/dirname
+++ b/tests/misc/dirname
@@ -1,5 +1,23 @@
#!/bin/sh
# -*-perl-*-
+# Test "dirname".
+
+# Copyright (C) 2006 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/misc/expand b/tests/misc/expand
index 09373d59b..dcf06815f 100755
--- a/tests/misc/expand
+++ b/tests/misc/expand
@@ -2,6 +2,23 @@
# -*- perl -*-
# Exercise expand.
+# Copyright (C) 2004, 2005, 2006 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/misc/false-status b/tests/misc/false-status
index 2d85bb56c..0397c2992 100755
--- a/tests/misc/false-status
+++ b/tests/misc/false-status
@@ -1,6 +1,23 @@
#!/bin/sh
# ensure that false exits nonzero even with --help or --version
+# Copyright (C) 2003, 2006 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
false --version
diff --git a/tests/misc/fold b/tests/misc/fold
index d070d4586..ceab2e9d8 100755
--- a/tests/misc/fold
+++ b/tests/misc/fold
@@ -2,6 +2,23 @@
# -*- perl -*-
# Exercise fold.
+# Copyright (C) 2003, 2005, 2006 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/misc/head-c b/tests/misc/head-c
index bd899aff4..387a5be8f 100755
--- a/tests/misc/head-c
+++ b/tests/misc/head-c
@@ -1,5 +1,22 @@
#!/bin/sh
-# exercize the fix of 2001-08-18, based on test case from Ian Bruce
+# exercise the fix of 2001-08-18, based on test case from Ian Bruce
+
+# Copyright (C) 2001, 2004 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
if test "$VERBOSE" = yes; then
set -x
diff --git a/tests/misc/head-elide-tail b/tests/misc/head-elide-tail
index b7a49a2cb..911ca6129 100755
--- a/tests/misc/head-elide-tail
+++ b/tests/misc/head-elide-tail
@@ -2,6 +2,23 @@
# -*- perl -*-
# Exercise head's --bytes=-N option.
+# Copyright (C) 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/misc/head-pos b/tests/misc/head-pos
index a8791f2e9..edb334311 100755
--- a/tests/misc/head-pos
+++ b/tests/misc/head-pos
@@ -2,6 +2,23 @@
# When reading a specified number of lines, ensure that the output
# file pointer is positioned just after those lines.
+# Copyright (C) 2002, 2004 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
head --version
diff --git a/tests/misc/mknod b/tests/misc/mknod
index b6670ab08..ca15feb8a 100755
--- a/tests/misc/mknod
+++ b/tests/misc/mknod
@@ -1,6 +1,23 @@
#!/bin/sh
# Ensure that mknod, mkfifo, mkdir -m MODE work with a restrictive umask
+# Copyright (C) 2004, 2006 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
mknod --version
diff --git a/tests/misc/nice b/tests/misc/nice
index 99cb58eed..02c10b5fb 100755
--- a/tests/misc/nice
+++ b/tests/misc/nice
@@ -1,4 +1,23 @@
#! /bin/sh
+# Test "nice".
+
+# Copyright (C) 2002, 2003, 2005, 2006 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
# This script takes no arguments.
if test -n "$DJDIR"; then
diff --git a/tests/misc/nl b/tests/misc/nl
index 2bc9c8936..2244ae281 100755
--- a/tests/misc/nl
+++ b/tests/misc/nl
@@ -1,6 +1,23 @@
#!/bin/sh
# exercise nl functionality
+# Copyright (C) 2002, 2003 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
nl --version
diff --git a/tests/misc/nohup b/tests/misc/nohup
index 112811705..d44d3f986 100755
--- a/tests/misc/nohup
+++ b/tests/misc/nohup
@@ -1,6 +1,23 @@
#!/bin/sh
# test nohup
+# Copyright (C) 2003, 2006 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
nohup --version
diff --git a/tests/misc/paste-no-nl b/tests/misc/paste-no-nl
index b854f8385..6fafb0845 100755
--- a/tests/misc/paste-no-nl
+++ b/tests/misc/paste-no-nl
@@ -2,6 +2,23 @@
# -*- perl -*-
# Ensure that paste properly handles files lacking a final newline.
+# Copyright (C) 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/misc/pathchk1 b/tests/misc/pathchk1
index 7d2d3de88..eb7b462ad 100755
--- a/tests/misc/pathchk1
+++ b/tests/misc/pathchk1
@@ -1,6 +1,23 @@
#!/bin/sh
# pathchk tests
+# Copyright (C) 2002, 2004, 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
pathchk --version
diff --git a/tests/misc/printf b/tests/misc/printf
index 64d16f336..6b29277b0 100755
--- a/tests/misc/printf
+++ b/tests/misc/printf
@@ -1,6 +1,23 @@
#!/bin/sh
# basic tests for printf
+# Copyright (C) 2002, 2003, 2004 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
prog=`pwd`/../../src/printf
if test "$VERBOSE" = yes; then
diff --git a/tests/misc/printf-hex b/tests/misc/printf-hex
index 7fbd1c1dd..df001cd8d 100755
--- a/tests/misc/printf-hex
+++ b/tests/misc/printf-hex
@@ -1,6 +1,23 @@
#!/bin/sh
# make sure that only two hex. digits are consumed in a \xHHH sequence
+# Copyright (C) 2002, 2004 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
prog=`pwd`/../../src/printf
if test "$VERBOSE" = yes; then
diff --git a/tests/misc/pwd-long b/tests/misc/pwd-long
index 5ae4c0449..c4af777f3 100755
--- a/tests/misc/pwd-long
+++ b/tests/misc/pwd-long
@@ -1,4 +1,22 @@
#!/bin/sh
+# Check "printf" with long arguments.
+
+# Copyright (C) 2006 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
: ${PERL=perl}
diff --git a/tests/misc/sha224sum b/tests/misc/sha224sum
index edbe05858..2b3c40201 100755
--- a/tests/misc/sha224sum
+++ b/tests/misc/sha224sum
@@ -1,4 +1,22 @@
#!/bin/sh
+# Test "sha224sum".
+
+# Copyright (C) 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/misc/sha256sum b/tests/misc/sha256sum
index 2b65372b2..59ee0726e 100755
--- a/tests/misc/sha256sum
+++ b/tests/misc/sha256sum
@@ -1,4 +1,22 @@
#!/bin/sh
+# Test "sha256sum".
+
+# Copyright (C) 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/misc/sha384sum b/tests/misc/sha384sum
index 507fb6737..823610441 100755
--- a/tests/misc/sha384sum
+++ b/tests/misc/sha384sum
@@ -1,4 +1,22 @@
#!/bin/sh
+# Test "sha384sum".
+
+# Copyright (C) 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/misc/sha512sum b/tests/misc/sha512sum
index f61c7149e..84f4cfb3c 100755
--- a/tests/misc/sha512sum
+++ b/tests/misc/sha512sum
@@ -1,4 +1,22 @@
#!/bin/sh
+# Test "sha512sum".
+
+# Copyright (C) 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/misc/shuf b/tests/misc/shuf
index 17dea5045..585df9901 100755
--- a/tests/misc/shuf
+++ b/tests/misc/shuf
@@ -1,6 +1,23 @@
#!/bin/sh
# Ensure that shuf randomizes its input.
+# Copyright (C) 2006 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
shuf --version
diff --git a/tests/misc/sort-merge b/tests/misc/sort-merge
index d27f42ea1..a737e4d9d 100755
--- a/tests/misc/sort-merge
+++ b/tests/misc/sort-merge
@@ -1,4 +1,22 @@
#!/bin/sh
+# Test "sort -m".
+
+# Copyright (C) 2002, 2003, 2005, 2006 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/misc/sort-rand b/tests/misc/sort-rand
index 37c19e0ab..04bcc477f 100755
--- a/tests/misc/sort-rand
+++ b/tests/misc/sort-rand
@@ -1,6 +1,23 @@
#!/bin/sh
# Ensure that sort --sort-random doesn't sort.
+# Copyright (C) 2005, 2006 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
sort --version
diff --git a/tests/misc/split-a b/tests/misc/split-a
index a9940b71f..3ae4736c2 100755
--- a/tests/misc/split-a
+++ b/tests/misc/split-a
@@ -1,6 +1,23 @@
#!/bin/sh
# Show that split -a works.
+# Copyright (C) 2002, 2003, 2004 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
split --version
diff --git a/tests/misc/split-fail b/tests/misc/split-fail
index 79bda949b..1268190b8 100755
--- a/tests/misc/split-fail
+++ b/tests/misc/split-fail
@@ -1,6 +1,23 @@
#!/bin/sh
# split must fail when given length/count of zero.
+# Copyright (C) 2003, 2004, 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
split --version
diff --git a/tests/misc/split-l b/tests/misc/split-l
index 10148bab2..27c4c3f1b 100755
--- a/tests/misc/split-l
+++ b/tests/misc/split-l
@@ -1,6 +1,23 @@
#!/bin/sh
# show that `split --lines=2' works.
+# Copyright (C) 2002 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
ln --version
diff --git a/tests/misc/stat-fmt b/tests/misc/stat-fmt
index 4283ff7df..560ea1014 100755
--- a/tests/misc/stat-fmt
+++ b/tests/misc/stat-fmt
@@ -1,6 +1,23 @@
#!/bin/sh
# ensure that stat properly handles a format string ending with %
+# Copyright (C) 2003, 2004 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
stat --version
diff --git a/tests/misc/stat-printf b/tests/misc/stat-printf
index 13a63c4d9..ecd494093 100755
--- a/tests/misc/stat-printf
+++ b/tests/misc/stat-printf
@@ -1,4 +1,22 @@
#!/bin/sh
+# Test "stat --printf".
+
+# Copyright (C) 2005, 2006 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/misc/tac-continue b/tests/misc/tac-continue
index fd9e120ab..41764296b 100755
--- a/tests/misc/tac-continue
+++ b/tests/misc/tac-continue
@@ -3,6 +3,23 @@
# when it encounters an error with say the first one.
# With coreutils-5.2.1 and earlier, this test would fail.
+# Copyright (C) 2004 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
tac --version
diff --git a/tests/misc/test-diag b/tests/misc/test-diag
index c154f38cf..87fe7573c 100755
--- a/tests/misc/test-diag
+++ b/tests/misc/test-diag
@@ -1,4 +1,22 @@
#!/bin/sh
+# Test the diagnostics of "test".
+
+# Copyright (C) 2006 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/misc/tty-eof b/tests/misc/tty-eof
index 39e9e0399..37d4c3a04 100755
--- a/tests/misc/tty-eof
+++ b/tests/misc/tty-eof
@@ -1,4 +1,22 @@
#!/bin/sh
+# Test whether programs exit upon a single EOF from a tty.
+
+# Copyright (C) 2003, 2006 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
: ${PERL=perl}
diff --git a/tests/misc/wc-files0 b/tests/misc/wc-files0
index 8041359c8..758024aa7 100755
--- a/tests/misc/wc-files0
+++ b/tests/misc/wc-files0
@@ -1,6 +1,23 @@
#!/bin/sh
# Show that wc's new --files0-from option works.
+# Copyright (C) 2006 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
wc --version
diff --git a/tests/misc/wc-files0-from b/tests/misc/wc-files0-from
index 459d87792..72f1bdf89 100755
--- a/tests/misc/wc-files0-from
+++ b/tests/misc/wc-files0-from
@@ -3,6 +3,23 @@
# Exercise wc's --files0-from option.
# This file bears a striking resemblance to tests/du/files0-from.
+# Copyright (C) 2006 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
: ${PERL=perl}
: ${srcdir=.}