summaryrefslogtreecommitdiff
path: root/tests/ls
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ls')
-rw-r--r--tests/ls/Makefile.am20
-rw-r--r--tests/ls/Test.pm19
-rwxr-xr-xtests/ls/dangle17
-rwxr-xr-xtests/ls/dired17
-rwxr-xr-xtests/ls/file-type17
-rwxr-xr-xtests/ls/follow-slink17
-rwxr-xr-xtests/ls/infloop17
-rwxr-xr-xtests/ls/inode17
-rwxr-xr-xtests/ls/m-option17
-rwxr-xr-xtests/ls/no-arg17
-rwxr-xr-xtests/ls/recursive17
-rwxr-xr-xtests/ls/rt-117
-rwxr-xr-xtests/ls/stat-dtype18
-rwxr-xr-xtests/ls/stat-failed17
-rwxr-xr-xtests/ls/stat-vs-dirent17
-rwxr-xr-xtests/ls/symlink-slash17
-rwxr-xr-xtests/ls/time-118
17 files changed, 295 insertions, 1 deletions
diff --git a/tests/ls/Makefile.am b/tests/ls/Makefile.am
index fc8af7c55..add9988c1 100644
--- a/tests/ls/Makefile.am
+++ b/tests/ls/Makefile.am
@@ -1,4 +1,22 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
+# Make coreutils tests for "ls". -*-Makefile-*-
+
+# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 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.
AUTOMAKE_OPTIONS = 1.2 gnits
diff --git a/tests/ls/Test.pm b/tests/ls/Test.pm
index 8d5d8d4db..f1be61fff 100644
--- a/tests/ls/Test.pm
+++ b/tests/ls/Test.pm
@@ -1,3 +1,22 @@
+# Test "ls".
+
+# Copyright (C) 1997 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.
+
package Test;
require 5.002;
use strict;
diff --git a/tests/ls/dangle b/tests/ls/dangle
index b08d245db..f9fc77022 100755
--- a/tests/ls/dangle
+++ b/tests/ls/dangle
@@ -1,6 +1,23 @@
#!/bin/sh
# Make sure ls properly handles dangling symlinks vs. ls's -L, -H, options.
+# 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
ls --version
diff --git a/tests/ls/dired b/tests/ls/dired
index 8126e0a45..0bac42b60 100755
--- a/tests/ls/dired
+++ b/tests/ls/dired
@@ -1,6 +1,23 @@
#!/bin/sh
# make sure --dired option works
+# Copyright (C) 2001, 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
ls --version
diff --git a/tests/ls/file-type b/tests/ls/file-type
index 8eafe9554..27f2f7739 100755
--- a/tests/ls/file-type
+++ b/tests/ls/file-type
@@ -1,6 +1,23 @@
#!/bin/sh
# contrast ls -F, ls -p, and ls --indicator-style=file-type
+# Copyright (C) 2002, 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
ls --version
diff --git a/tests/ls/follow-slink b/tests/ls/follow-slink
index 527393e56..cb6a6ed3c 100755
--- a/tests/ls/follow-slink
+++ b/tests/ls/follow-slink
@@ -1,6 +1,23 @@
#!/bin/sh
# make sure ls -L always follows symlinks
+# Copyright (C) 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
set -x
ls --version
diff --git a/tests/ls/infloop b/tests/ls/infloop
index 9e2ad79fc..b413b2a71 100755
--- a/tests/ls/infloop
+++ b/tests/ls/infloop
@@ -2,6 +2,23 @@
# show that the following no longer makes ls infloop
# mkdir loop; cd loop; ln -s ../loop sub; ls -RL
+# Copyright (C) 2001, 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
ls --version
diff --git a/tests/ls/inode b/tests/ls/inode
index efaa02e1d..2a39b0262 100755
--- a/tests/ls/inode
+++ b/tests/ls/inode
@@ -1,6 +1,23 @@
#!/bin/sh
# Make sure that ls -i works properly on symlinks.
+# 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
ls --version
diff --git a/tests/ls/m-option b/tests/ls/m-option
index 855ca9088..f5b0cfcc5 100755
--- a/tests/ls/m-option
+++ b/tests/ls/m-option
@@ -1,6 +1,23 @@
#!/bin/sh
# exercise the -m option
+# 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
ls --version
diff --git a/tests/ls/no-arg b/tests/ls/no-arg
index 46fa6d901..809397c2b 100755
--- a/tests/ls/no-arg
+++ b/tests/ls/no-arg
@@ -1,6 +1,23 @@
#!/bin/sh
# make sure ls and `ls -R' do the right thing when invoked with no arguments.
+# Copyright (C) 2001, 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
ls --version
diff --git a/tests/ls/recursive b/tests/ls/recursive
index 455db181a..31e3fe104 100755
--- a/tests/ls/recursive
+++ b/tests/ls/recursive
@@ -2,6 +2,23 @@
# 4.1.1 and 4.1.2 had a bug whereby some recursive listings
# didn't include a blank line between per-directory groups of files.
+# Copyright (C) 2001, 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
ls --version
diff --git a/tests/ls/rt-1 b/tests/ls/rt-1
index 3d89a7b9f..c7ba4e565 100755
--- a/tests/ls/rt-1
+++ b/tests/ls/rt-1
@@ -1,6 +1,23 @@
#!/bin/sh
# Make sure name is used as secondary key when sorting on mtime or ctime.
+# Copyright (C) 1998, 2001, 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.
+
. $srcdir/../envvar-check
. $srcdir/../lang-default
diff --git a/tests/ls/stat-dtype b/tests/ls/stat-dtype
index f6a50fda8..5851fdc7e 100755
--- a/tests/ls/stat-dtype
+++ b/tests/ls/stat-dtype
@@ -1,5 +1,23 @@
#!/bin/sh
# Ensure that ls --file-type does not call stat unnecessarily.
+
+# 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.
+
# The trick is to create an un-stat'able symlink and to see if ls
# can report its type nonetheless, using dirent.d_type.
diff --git a/tests/ls/stat-failed b/tests/ls/stat-failed
index fc6abf3a2..4b50a6977 100755
--- a/tests/ls/stat-failed
+++ b/tests/ls/stat-failed
@@ -2,6 +2,23 @@
# Verify that ls works properly when it fails to stat a file that is
# not mentioned on the command line.
+# 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
ls --version
diff --git a/tests/ls/stat-vs-dirent b/tests/ls/stat-vs-dirent
index 048ba5fc4..eab3a69e5 100755
--- a/tests/ls/stat-vs-dirent
+++ b/tests/ls/stat-vs-dirent
@@ -1,6 +1,23 @@
#!/bin/sh
# Ensure that d_ino (from ls -di) and st_ino (from stat --format=%i) match.
+# 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
ls --version
diff --git a/tests/ls/symlink-slash b/tests/ls/symlink-slash
index 8862353e9..1caa2219b 100755
--- a/tests/ls/symlink-slash
+++ b/tests/ls/symlink-slash
@@ -1,6 +1,23 @@
#!/bin/sh
# Do dereference a symlink arg if its name is written with a trailing slash.
+# Copyright (C) 1999, 2000, 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
ls --version
diff --git a/tests/ls/time-1 b/tests/ls/time-1
index 1d50033ca..aaaf04ad1 100755
--- a/tests/ls/time-1
+++ b/tests/ls/time-1
@@ -1,6 +1,24 @@
#!/bin/sh
# Test some of ls's sorting options.
+# Copyright (C) 1998, 1999, 2000, 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
ls --version