Don't assume that install-sh without -c
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 5 Jul 2004 07:07:55 +0000 (07:07 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 5 Jul 2004 07:07:55 +0000 (07:07 +0000)
moves (it now copies).  Add tests for new -t and -T options.

tests/instsh2.test

index 10f9f2b..894431a 100755 (executable)
@@ -48,7 +48,7 @@ test -d d3
 test -f x
 test -f y
 ./install-sh -m 644 y z
-test -f y
+test -f y
 test -f z
 # Multiple files
 ./install-sh -m 644 -c x z d1
@@ -57,14 +57,23 @@ 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 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 x d3/y
+test -f x
+test -f d3/y
+./install-sh -T x d3 && 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'
+test -f 'a b'