* t/insh2.sh: Rename...
* t/dist-install-sh.sh: ... like this.
* t/instsh.sh: Rename...
* t/add-missing-install-sh.sh: ... like this.
* t/instsh2.sh: Rename...
* t/install-sh-unittests.sh: ... like this.
* t/instsh3.sh: Rename...
* t/install-sh-option-C.sh: ... like this.
* t/list-of-tests.mk: Adjust.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
--- /dev/null
+#! /bin/sh
+# Copyright (C) 1996-2013 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, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test for this bug:
+# automake: Makefile.am: required file "../../install-sh" not found; installing
+# This also makes sure that install-sh is created in the correct directory.
+
+. test-init.sh
+
+: > Makefile.am
+rm -f install-sh
+
+# Since the default path includes '../..', we must run this test in
+# yet another subdir.
+mkdir frob
+mv Makefile.am configure.ac frob/
+cd frob
+
+$ACLOCAL
+$AUTOMAKE --add-missing >output 2>&1 || { cat output; exit 1; }
+cat output
+
+# Only one '/' should appear in the output.
+grep '/.*/' output && exit 1
+
+test -f install-sh
+
+:
--- /dev/null
+#! /bin/sh
+# Copyright (C) 1996-2013 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, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test for bug where install-sh not included in distribution.
+
+. test-init.sh
+
+echo AC_OUTPUT >> configure.ac
+
+cat > Makefile.am << 'END'
+pkgdata_DATA =
+.PHONY: test
+test: distdir
+ find $(distdir) ;: For debugging.
+ echo ' ' $(DISTFILES) ' ' | grep '[ /]install-sh '
+ echo ' ' $(DIST_COMMON) ' ' | grep '[ /]install-sh '
+ test -f $(distdir)/install-sh
+END
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+./configure
+$MAKE test
+
+:
+++ /dev/null
-#! /bin/sh
-# Copyright (C) 1996-2013 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, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Test for bug where install-sh not included in distribution.
-
-. test-init.sh
-
-echo AC_OUTPUT >> configure.ac
-
-cat > Makefile.am << 'END'
-pkgdata_DATA =
-.PHONY: test
-test: distdir
- find $(distdir) ;: For debugging.
- echo ' ' $(DISTFILES) ' ' | grep '[ /]install-sh '
- echo ' ' $(DIST_COMMON) ' ' | grep '[ /]install-sh '
- test -f $(distdir)/install-sh
-END
-
-$ACLOCAL
-$AUTOMAKE
-$AUTOCONF
-
-./configure
-$MAKE test
-
-:
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2006-2013 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, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# More install-sh checks: check -C.
+
+am_create_testdir=empty
+required=non-root
+. test-init.sh
+
+# Solaris /usr/ucb/touch does not accept -t.
+touch -t "$old_timestamp" foo \
+ || skip_ "touch utility doesn't accept '-t' option"
+
+get_shell_script install-sh
+
+./install-sh -d d1
+
+# Do not change the timestamps when using -C.
+echo foo >file
+./install-sh -C file d1
+TZ=UTC0 touch -t $old_timestamp d1/file
+./install-sh -C file d1
+is_newest file d1/file
+echo foo1 >file
+./install-sh -C file d1
+diff file d1/file
+# Rights must be updated.
+./install-sh -C -m 444 file d1
+test -r d1/file
+test ! -w d1/file
+
+:
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2002-2013 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, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Various install-sh checks.
+
+am_create_testdir=empty
+. test-init.sh
+
+get_shell_script install-sh
+
+# Basic errors.
+./install-sh && exit 1
+./install-sh -m 644 dest && exit 1
+
+# Directories.
+
+# It should be OK to create no directory. We sometimes need
+# this when directory are conditionally defined.
+./install-sh -d
+# One directory.
+./install-sh -d d0
+test -d d0
+# Multiple directories (for make installdirs).
+./install-sh -d d1 d2 d3 d4
+test -d d1
+test -d d2
+test -d d3
+test -d d4
+# Subdirectories.
+./install-sh -d p1/p2/p3 p4//p5//p6//
+test -d p1/p2/p3
+test -d p4/p5/p6
+
+# Files.
+: > x
+./install-sh -c -m 644 x y
+test -f x
+test -f y
+./install-sh -m 644 y z
+test -f y
+test -f z
+# Multiple files.
+./install-sh -m 644 -c x z d1
+test -f x
+test -f z
+test -f d1/x
+test -f d1/z
+./install-sh -m 644 x z d2//
+test -f x
+test -f z
+test -f d2/x
+test -f d2/z
+./install-sh -t d3 -m 644 x z
+test -f x
+test -f z
+test -f d3/x
+test -f d3/z
+./install-sh -t d4// -m 644 x z
+test -f x
+test -f z
+test -f d4/x
+test -f d4/z
+./install-sh -T x d3/y
+test -f x
+test -f d3/y
+./install-sh -T x d3 && exit 1
+./install-sh -T x d4// && exit 1
+
+# Ensure that install-sh works with names that include spaces.
+touch 'a b'
+mkdir 'x y'
+./install-sh 'a b' 'x y'
+test -f x\ \ y/a\ \ b
+test -f 'a b'
+
+# Ensure we do not run into 'test' operator precedence bugs with Tru64 sh.
+for c in = '(' ')' '!'; do
+ ./install-sh $c 2>stderr && { cat stderr >&2; exit 1; }
+ cat stderr >&2
+ grep 'test: ' stderr && exit 1
+ # Skip tests if the file system is not capable.
+ mkdir ./$c || continue
+ rmdir ./$c
+ ./install-sh -d $c/$c/$c
+ rm -rf ./$c
+ ./install-sh -d $c d5/$c/$c
+ test -d ./$c
+ test -d d5/$c/$c
+ ./install-sh x $c
+ test -f ./$c/x
+ rm -f ./$c/x
+ ./install-sh -t $c x
+ test -f ./$c/x
+ rm -rf ./$c
+ ( : > ./$c ) || continue
+ ./install-sh $c x d5/$c/$c
+ test -f d5/$c/$c/x
+ test -f d5/$c/$c/$c
+ rm -f d5/$c/$c/?
+ ./install-sh -t d5/$c/$c $c x
+ test -f d5/$c/$c/x
+ test -f d5/$c/$c/$c
+done
+
+:
+++ /dev/null
-#! /bin/sh
-# Copyright (C) 1996-2013 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, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Test for this bug:
-# automake: Makefile.am: required file "../../install-sh" not found; installing
-# This also makes sure that install-sh is created in the correct directory.
-
-. test-init.sh
-
-: > Makefile.am
-rm -f install-sh
-
-# Since the default path includes '../..', we must run this test in
-# yet another subdir.
-mkdir frob
-mv Makefile.am configure.ac frob/
-cd frob
-
-$ACLOCAL
-$AUTOMAKE --add-missing >output 2>&1 || { cat output; exit 1; }
-cat output
-
-# Only one '/' should appear in the output.
-grep '/.*/' output && exit 1
-
-test -f install-sh
-
-:
+++ /dev/null
-#! /bin/sh
-# Copyright (C) 2002-2013 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, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Various install-sh checks.
-
-am_create_testdir=empty
-. test-init.sh
-
-get_shell_script install-sh
-
-# Basic errors.
-./install-sh && exit 1
-./install-sh -m 644 dest && exit 1
-
-# Directories.
-
-# It should be OK to create no directory. We sometimes need
-# this when directory are conditionally defined.
-./install-sh -d
-# One directory.
-./install-sh -d d0
-test -d d0
-# Multiple directories (for make installdirs).
-./install-sh -d d1 d2 d3 d4
-test -d d1
-test -d d2
-test -d d3
-test -d d4
-# Subdirectories.
-./install-sh -d p1/p2/p3 p4//p5//p6//
-test -d p1/p2/p3
-test -d p4/p5/p6
-
-# Files.
-: > x
-./install-sh -c -m 644 x y
-test -f x
-test -f y
-./install-sh -m 644 y z
-test -f y
-test -f z
-# Multiple files.
-./install-sh -m 644 -c x z d1
-test -f x
-test -f z
-test -f d1/x
-test -f d1/z
-./install-sh -m 644 x z d2//
-test -f x
-test -f z
-test -f d2/x
-test -f d2/z
-./install-sh -t d3 -m 644 x z
-test -f x
-test -f z
-test -f d3/x
-test -f d3/z
-./install-sh -t d4// -m 644 x z
-test -f x
-test -f z
-test -f d4/x
-test -f d4/z
-./install-sh -T x d3/y
-test -f x
-test -f d3/y
-./install-sh -T x d3 && exit 1
-./install-sh -T x d4// && exit 1
-
-# Ensure that install-sh works with names that include spaces.
-touch 'a b'
-mkdir 'x y'
-./install-sh 'a b' 'x y'
-test -f x\ \ y/a\ \ b
-test -f 'a b'
-
-# Ensure we do not run into 'test' operator precedence bugs with Tru64 sh.
-for c in = '(' ')' '!'; do
- ./install-sh $c 2>stderr && { cat stderr >&2; exit 1; }
- cat stderr >&2
- grep 'test: ' stderr && exit 1
- # Skip tests if the file system is not capable.
- mkdir ./$c || continue
- rmdir ./$c
- ./install-sh -d $c/$c/$c
- rm -rf ./$c
- ./install-sh -d $c d5/$c/$c
- test -d ./$c
- test -d d5/$c/$c
- ./install-sh x $c
- test -f ./$c/x
- rm -f ./$c/x
- ./install-sh -t $c x
- test -f ./$c/x
- rm -rf ./$c
- ( : > ./$c ) || continue
- ./install-sh $c x d5/$c/$c
- test -f d5/$c/$c/x
- test -f d5/$c/$c/$c
- rm -f d5/$c/$c/?
- ./install-sh -t d5/$c/$c $c x
- test -f d5/$c/$c/x
- test -f d5/$c/$c/$c
-done
-
-:
+++ /dev/null
-#! /bin/sh
-# Copyright (C) 2006-2013 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, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# More install-sh checks: check -C.
-
-am_create_testdir=empty
-required=non-root
-. test-init.sh
-
-# Solaris /usr/ucb/touch does not accept -t.
-touch -t "$old_timestamp" foo \
- || skip_ "touch utility doesn't accept '-t' option"
-
-get_shell_script install-sh
-
-./install-sh -d d1
-
-# Do not change the timestamps when using -C.
-echo foo >file
-./install-sh -C file d1
-TZ=UTC0 touch -t $old_timestamp d1/file
-./install-sh -C file d1
-is_newest file d1/file
-echo foo1 >file
-./install-sh -C file d1
-diff file d1/file
-# Rights must be updated.
-./install-sh -C -m 444 file d1
-test -r d1/file
-test ! -w d1/file
-
-:
t/implicit.sh \
t/init.sh \
t/init2.sh \
-t/insh2.sh \
+t/dist-install-sh.sh \
t/dist-with-unreadable-makefile-fails.sh \
t/installdir.sh \
-t/instsh.sh \
-t/instsh2.sh \
-t/instsh3.sh \
+t/add-missing-install-sh.sh \
+t/install-sh-unittests.sh \
+t/install-sh-option-C.sh \
t/instdat.sh \
t/instdat2.sh \
t/instdir.sh \