summaryrefslogtreecommitdiff
path: root/tests/rm
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2006-08-17 19:58:17 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2006-08-17 19:58:17 +0000
commit218fa5c61ba2f211b175aa943faa7eea286ff69e (patch)
treed54a459a9d5016a567e168b385cc3c4670f603ef /tests/rm
parent23f176cae633cc795a8d7a0becb56ba1481f32ba (diff)
downloadcoreutils-218fa5c61ba2f211b175aa943faa7eea286ff69e.tar.xz
Add/fix copyright notices and adjust to latest GNU FDL.
Diffstat (limited to 'tests/rm')
-rw-r--r--tests/rm/Makefile.am21
-rwxr-xr-xtests/rm/cycle17
-rwxr-xr-xtests/rm/dangling-symlink17
-rwxr-xr-xtests/rm/deep-119
-rwxr-xr-xtests/rm/dir-no-w17
-rwxr-xr-xtests/rm/dir-nonrecur17
-rwxr-xr-xtests/rm/dot-rel17
-rwxr-xr-xtests/rm/empty-inacc17
-rwxr-xr-xtests/rm/empty-name19
-rwxr-xr-xtests/rm/f-118
-rwxr-xr-xtests/rm/fail-2eperm17
-rwxr-xr-xtests/rm/fail-eperm17
-rwxr-xr-xtests/rm/hash17
-rwxr-xr-xtests/rm/i-118
-rwxr-xr-xtests/rm/i-no-r17
-rwxr-xr-xtests/rm/inaccessible17
-rwxr-xr-xtests/rm/interactive-always17
-rwxr-xr-xtests/rm/interactive-once17
-rwxr-xr-xtests/rm/ir-119
-rwxr-xr-xtests/rm/isatty18
-rwxr-xr-xtests/rm/no-give-up17
-rwxr-xr-xtests/rm/r-119
-rwxr-xr-xtests/rm/r-219
-rwxr-xr-xtests/rm/r-320
-rwxr-xr-xtests/rm/rm117
-rwxr-xr-xtests/rm/rm218
-rwxr-xr-xtests/rm/rm317
-rwxr-xr-xtests/rm/rm417
-rwxr-xr-xtests/rm/rm517
-rwxr-xr-xtests/rm/sunos-119
-rwxr-xr-xtests/rm/unread217
-rwxr-xr-xtests/rm/unread317
-rwxr-xr-xtests/rm/unreadable18
33 files changed, 584 insertions, 1 deletions
diff --git a/tests/rm/Makefile.am b/tests/rm/Makefile.am
index 4a5e836dc..4b5c3e85a 100644
--- a/tests/rm/Makefile.am
+++ b/tests/rm/Makefile.am
@@ -1,4 +1,23 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
+# Make coreutils tests for "rm". -*-Makefile-*-
+
+# Copyright (C) 1997, 1998, 2000, 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.
+
AUTOMAKE_OPTIONS = 1.1 gnits
TESTS = \
diff --git a/tests/rm/cycle b/tests/rm/cycle
index b021c5707..f77f90df9 100755
--- a/tests/rm/cycle
+++ b/tests/rm/cycle
@@ -1,6 +1,23 @@
#!/bin/sh
# rm (coreutils-4.5.4) could be tricked into mistakenly reporting a cycle.
+# Copyright (C) 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
rm --version
diff --git a/tests/rm/dangling-symlink b/tests/rm/dangling-symlink
index 1072776cb..388ca1d07 100755
--- a/tests/rm/dangling-symlink
+++ b/tests/rm/dangling-symlink
@@ -4,6 +4,23 @@
# But for fileutils-4.1.9, it would do the former and
# for fileutils-4.1.10 the latter.
+# 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
rm --version
diff --git a/tests/rm/deep-1 b/tests/rm/deep-1
index b1cb5928d..b5ae89754 100755
--- a/tests/rm/deep-1
+++ b/tests/rm/deep-1
@@ -1,4 +1,23 @@
#!/bin/sh
+# Test "rm" with a deep hierarchy.
+
+# Copyright (C) 1997, 2002, 2003, 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.
# This is a bit of a torture test for mkdir -p, too.
# GNU rm performs *much* better on systems that have a d_type member
diff --git a/tests/rm/dir-no-w b/tests/rm/dir-no-w
index 39e508e5e..6dd04aa3e 100755
--- a/tests/rm/dir-no-w
+++ b/tests/rm/dir-no-w
@@ -2,6 +2,23 @@
# rm (without -r) must give a diagnostic for any directory.
# It must not prompt, even if that directory is unwritable.
+# 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.
+
if test "$VERBOSE" = yes; then
set -x
rm --version
diff --git a/tests/rm/dir-nonrecur b/tests/rm/dir-nonrecur
index eaacdb368..fd10ba936 100755
--- a/tests/rm/dir-nonrecur
+++ b/tests/rm/dir-nonrecur
@@ -2,6 +2,23 @@
# Ensure that `rm dir' (i.e., without --recursive) gives a reasonable
# diagnostic when failing.
+# 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.
+
if test "$VERBOSE" = yes; then
set -x
rm --version
diff --git a/tests/rm/dot-rel b/tests/rm/dot-rel
index 91a41e663..41bea4aaa 100755
--- a/tests/rm/dot-rel
+++ b/tests/rm/dot-rel
@@ -2,6 +2,23 @@
# Use rm -r to remove two non-empty dot-relative directories.
# This would have failed between 2004-10-18 and 2004-10-21.
+# 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
rm --version
diff --git a/tests/rm/empty-inacc b/tests/rm/empty-inacc
index 6c009759f..5db86ad42 100755
--- a/tests/rm/empty-inacc
+++ b/tests/rm/empty-inacc
@@ -1,6 +1,23 @@
#!/bin/sh
# Ensure that rm -rf removes an empty-and-inaccessible directory.
+# 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
rm --version
diff --git a/tests/rm/empty-name b/tests/rm/empty-name
index 90caa2671..e24a722ff 100755
--- a/tests/rm/empty-name
+++ b/tests/rm/empty-name
@@ -1,5 +1,24 @@
#!/bin/sh
# Make sure that rm -r '' fails.
+
+# Copyright (C) 1998, 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.
+
+
# On SunOS 4.1.3, running rm -r '' in a nonempty directory may
# actually remove files with names of entries in the current directory
# but relative to `/' rather than relative to the current directory.
diff --git a/tests/rm/f-1 b/tests/rm/f-1
index 5c339a0d2..bdd41d7ec 100755
--- a/tests/rm/f-1
+++ b/tests/rm/f-1
@@ -1,4 +1,22 @@
#!/bin/sh
+# Test "rm -f" with a nonexistent file.
+
+# Copyright (C) 1997, 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.
test=f-1
diff --git a/tests/rm/fail-2eperm b/tests/rm/fail-2eperm
index 7ee0e2a14..d53747374 100755
--- a/tests/rm/fail-2eperm
+++ b/tests/rm/fail-2eperm
@@ -2,6 +2,23 @@
# Like fail-eperm, but the failure must be for a file encountered
# while trying to remove the containing directory with the sticky bit set.
+# Copyright (C) 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
rm --version
diff --git a/tests/rm/fail-eperm b/tests/rm/fail-eperm
index 22dd1f728..d3bfd42c8 100755
--- a/tests/rm/fail-eperm
+++ b/tests/rm/fail-eperm
@@ -3,6 +3,23 @@
# Ensure that rm gives the expected diagnostic when failing to remove a file
# owned by some other user in a directory with the sticky bit set.
+# 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
rm --version
diff --git a/tests/rm/hash b/tests/rm/hash
index 8e7f8ce86..a07a2b1d0 100755
--- a/tests/rm/hash
+++ b/tests/rm/hash
@@ -3,6 +3,23 @@
# Before then, rm would fail occasionally, sometimes via
# a failed assertion, others with a seg fault.
+# Copyright (C) 2000, 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.
+
. $srcdir/../expensive
if test "$VERBOSE" = yes; then
diff --git a/tests/rm/i-1 b/tests/rm/i-1
index 7d3ac1e1b..0e606a2ab 100755
--- a/tests/rm/i-1
+++ b/tests/rm/i-1
@@ -1,4 +1,22 @@
#!/bin/sh
+# Test "rm -i".
+
+# Copyright (C) 1997, 1998, 2002, 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.
test=i-1
diff --git a/tests/rm/i-no-r b/tests/rm/i-no-r
index 57733c8fd..c0a0a8104 100755
--- a/tests/rm/i-no-r
+++ b/tests/rm/i-no-r
@@ -3,6 +3,23 @@
# recurse into directory DIR. rm -i (without -r) must fail in that case.
# Fixed in coreutils-4.5.2.
+# 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
rm --version
diff --git a/tests/rm/inaccessible b/tests/rm/inaccessible
index 79d691676..37c86b318 100755
--- a/tests/rm/inaccessible
+++ b/tests/rm/inaccessible
@@ -2,6 +2,23 @@
# Ensure that rm works even when run from a directory
# for which the user has no access at all.
+# 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/rm/interactive-always b/tests/rm/interactive-always
index ca8f38262..6dc623161 100755
--- a/tests/rm/interactive-always
+++ b/tests/rm/interactive-always
@@ -1,6 +1,23 @@
#!/bin/sh
# Test the --interactive[=WHEN] changes added to coreutils 6.0
+# 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.
+
test=interactive-always
if test "$VERBOSE" = yes; then
diff --git a/tests/rm/interactive-once b/tests/rm/interactive-once
index 4d55337fe..9643eff90 100755
--- a/tests/rm/interactive-once
+++ b/tests/rm/interactive-once
@@ -1,6 +1,23 @@
#!/bin/sh
# Test the -I option added to coreutils 6.0
+# 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.
+
test=interactive-once
if test "$VERBOSE" = yes; then
diff --git a/tests/rm/ir-1 b/tests/rm/ir-1
index e99c75895..4a84ecdf0 100755
--- a/tests/rm/ir-1
+++ b/tests/rm/ir-1
@@ -1,4 +1,23 @@
#!/bin/sh
+# Test "rm -ir".
+
+# Copyright (C) 1997, 1998, 2002, 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.
test=ir-1
diff --git a/tests/rm/isatty b/tests/rm/isatty
index 6985860eb..488788a5e 100755
--- a/tests/rm/isatty
+++ b/tests/rm/isatty
@@ -1,6 +1,24 @@
#!/bin/sh
# Make sure `chown 0 f; rm f' prompts before removing f.
+# Copyright (C) 2001, 2002, 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
rm --version
diff --git a/tests/rm/no-give-up b/tests/rm/no-give-up
index df26acb14..cabfc8840 100755
--- a/tests/rm/no-give-up
+++ b/tests/rm/no-give-up
@@ -2,6 +2,23 @@
# With rm from coreutils-5.2.1 and earlier, `rm -r' would mistakenly
# give up too early under some conditions.
+# 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
rm --version
diff --git a/tests/rm/r-1 b/tests/rm/r-1
index 30d37b872..6c03454c2 100755
--- a/tests/rm/r-1
+++ b/tests/rm/r-1
@@ -1,4 +1,23 @@
#!/bin/sh
+# Test "rm -r --verbose".
+
+# Copyright (C) 1997, 1998, 2000, 2002, 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.
test=r-1
diff --git a/tests/rm/r-2 b/tests/rm/r-2
index 127366471..5064413f6 100755
--- a/tests/rm/r-2
+++ b/tests/rm/r-2
@@ -1,4 +1,23 @@
#!/bin/sh
+# Test "rm -r --verbose".
+
+# Copyright (C) 1997, 1998, 2000, 2002, 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
rm --version
diff --git a/tests/rm/r-3 b/tests/rm/r-3
index debc80228..0bd6c4f85 100755
--- a/tests/rm/r-3
+++ b/tests/rm/r-3
@@ -1,5 +1,25 @@
#!/bin/sh
# Create and remove a directory with more than 254 files.
+
+# Copyright (C) 1997, 2001, 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.
+
+
# An early version of my rewritten rm failed to remove all of
# the files on SunOS4 when there were 254 or more in a directory.
diff --git a/tests/rm/rm1 b/tests/rm/rm1
index 397f4e865..3a73b0a35 100755
--- a/tests/rm/rm1
+++ b/tests/rm/rm1
@@ -1,6 +1,23 @@
#!/bin/sh
# exercise another small part of remove.c
+# 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
rm --version
diff --git a/tests/rm/rm2 b/tests/rm/rm2
index 00ea855b7..7fd5c1716 100755
--- a/tests/rm/rm2
+++ b/tests/rm/rm2
@@ -1,6 +1,24 @@
#!/bin/sh
# exercise another small part of remove.c
+# Copyright (C) 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
rm --version
diff --git a/tests/rm/rm3 b/tests/rm/rm3
index f27fd6cf5..a4c7b68d7 100755
--- a/tests/rm/rm3
+++ b/tests/rm/rm3
@@ -1,6 +1,23 @@
#!/bin/sh
# exercise another small part of remove.c
+# 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
rm --version
diff --git a/tests/rm/rm4 b/tests/rm/rm4
index 28af0d9d9..434ab2d8d 100755
--- a/tests/rm/rm4
+++ b/tests/rm/rm4
@@ -1,6 +1,23 @@
#!/bin/sh
# ensure that `rm dir' fails without --recursive
+# 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
rm --version
diff --git a/tests/rm/rm5 b/tests/rm/rm5
index 7868e903a..a08f93f13 100755
--- a/tests/rm/rm5
+++ b/tests/rm/rm5
@@ -1,6 +1,23 @@
#!/bin/sh
# a basic test of rm -ri
+# 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
rm --version
diff --git a/tests/rm/sunos-1 b/tests/rm/sunos-1
index c54a6db5d..abee7a18c 100755
--- a/tests/rm/sunos-1
+++ b/tests/rm/sunos-1
@@ -1,5 +1,24 @@
#!/bin/sh
# Make sure that rm -r '' fails.
+
+# Copyright (C) 1997, 1998, 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.
+
+
# On SunOS 4.1.3, running rm -r '' in a nonempty directory may
# actually remove files with names of entries in the current directory
# but relative to `/' rather than relative to the current directory.
diff --git a/tests/rm/unread2 b/tests/rm/unread2
index 55c74ff69..403a89198 100755
--- a/tests/rm/unread2
+++ b/tests/rm/unread2
@@ -1,6 +1,23 @@
#!/bin/sh
# exercise one small part of remove.c
+# Copyright (C) 2002, 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
rm --version
diff --git a/tests/rm/unread3 b/tests/rm/unread3
index d42ffe00d..3d359a770 100755
--- a/tests/rm/unread3
+++ b/tests/rm/unread3
@@ -1,6 +1,23 @@
#!/bin/sh
# Ensure that rm works even from an unreadable working directory.
+# 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
rm --version
diff --git a/tests/rm/unreadable b/tests/rm/unreadable
index a748da422..ca24deb86 100755
--- a/tests/rm/unreadable
+++ b/tests/rm/unreadable
@@ -1,4 +1,22 @@
#!/bin/sh
+# Test "rm" and unreadable directories.
+
+# Copyright (C) 1998, 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=.}