summaryrefslogtreecommitdiff
path: root/tests/cp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cp')
-rwxr-xr-xtests/cp/acl2
-rwxr-xr-xtests/cp/backup-14
-rwxr-xr-xtests/cp/backup-dir2
-rwxr-xr-xtests/cp/backup-is-src4
-rwxr-xr-xtests/cp/cp-HL4
-rwxr-xr-xtests/cp/cp-deref2
-rwxr-xr-xtests/cp/cp-i2
-rwxr-xr-xtests/cp/cp-mv-backup4
-rwxr-xr-xtests/cp/cp-parents6
-rwxr-xr-xtests/cp/deref-slink4
-rwxr-xr-xtests/cp/dir-rm-dest4
-rwxr-xr-xtests/cp/dir-slash4
-rwxr-xr-xtests/cp/dir-vs-file4
-rwxr-xr-xtests/cp/fail-perm2
-rwxr-xr-xtests/cp/into-self4
-rwxr-xr-xtests/cp/link4
-rwxr-xr-xtests/cp/link-no-deref2
-rwxr-xr-xtests/cp/link-preserve4
-rwxr-xr-xtests/cp/no-deref-link14
-rwxr-xr-xtests/cp/no-deref-link24
-rwxr-xr-xtests/cp/no-deref-link34
-rwxr-xr-xtests/cp/perm4
-rwxr-xr-xtests/cp/preserve-24
-rwxr-xr-xtests/cp/r-vs-symlink4
-rwxr-xr-xtests/cp/same-file2
-rwxr-xr-xtests/cp/slink-2-slink4
-rwxr-xr-xtests/cp/sparse2
-rwxr-xr-xtests/cp/special-bits4
-rwxr-xr-xtests/cp/src-base-dot2
-rwxr-xr-xtests/cp/symlink-slash4
30 files changed, 52 insertions, 52 deletions
diff --git a/tests/cp/acl b/tests/cp/acl
index 02761ced2..3a5eb3376 100755
--- a/tests/cp/acl
+++ b/tests/cp/acl
@@ -39,7 +39,7 @@ fi
pwd=`pwd`
t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
-trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0
+trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0
trap '(exit $?); exit $?' 1 2 13 15
framework_failure=0
diff --git a/tests/cp/backup-1 b/tests/cp/backup-1
index 48247ac4b..befce00a3 100755
--- a/tests/cp/backup-1
+++ b/tests/cp/backup-1
@@ -1,7 +1,7 @@
#!/bin/sh
# Test cp backup.
-# Copyright (C) 1997, 1999, 2002, 2004 Free Software Foundation, Inc.
+# Copyright (C) 1997, 1999, 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
@@ -25,7 +25,7 @@ fi
pwd=`pwd`
t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
-trap 'status=$?; cd $pwd; rm -rf $t0 && exit $status' 0
+trap 'status=$?; cd "$pwd" && rm -rf $t0 && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
framework_failure=0
diff --git a/tests/cp/backup-dir b/tests/cp/backup-dir
index 03bdfc43a..9bbae3d8e 100755
--- a/tests/cp/backup-dir
+++ b/tests/cp/backup-dir
@@ -27,7 +27,7 @@ fi
pwd=`pwd`
t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
-trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0
+trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0
trap '(exit $?); exit $?' 1 2 13 15
framework_failure=0
diff --git a/tests/cp/backup-is-src b/tests/cp/backup-is-src
index e0567b8e2..b4f90c881 100755
--- a/tests/cp/backup-is-src
+++ b/tests/cp/backup-is-src
@@ -1,7 +1,7 @@
#!/bin/sh
# Test cp backup to source file.
-# Copyright (C) 1998, 1999, 2000, 2002, 2004 Free Software Foundation,
+# Copyright (C) 1998, 1999, 2000, 2002, 2004, 2006 Free Software Foundation,
# Inc.
# This program is free software; you can redistribute it and/or modify
@@ -29,7 +29,7 @@ fi
pwd=`pwd`
t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
-trap 'status=$?; cd $pwd; rm -rf $t0 && exit $status' 0
+trap 'status=$?; cd "$pwd" && rm -rf $t0 && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
framework_failure=0
diff --git a/tests/cp/cp-HL b/tests/cp/cp-HL
index 02ebd7c67..2d5fff2df 100755
--- a/tests/cp/cp-HL
+++ b/tests/cp/cp-HL
@@ -1,7 +1,7 @@
#!/bin/sh
# test cp's -H and -L options
-# Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc.
+# 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
@@ -27,7 +27,7 @@ fi
pwd=`pwd`
t0=`echo "$0"|sed 's,.*/,,'`.tmp;tmp=$t0/$$
-trap 'status=$?; cd $pwd; rm -rf $t0 && exit $status' 0
+trap 'status=$?; cd "$pwd" && rm -rf $t0 && exit $status' 0
trap 'exit $?' 1 2 13 15
framework_failure=0
diff --git a/tests/cp/cp-deref b/tests/cp/cp-deref
index 80085c263..d90139d3f 100755
--- a/tests/cp/cp-deref
+++ b/tests/cp/cp-deref
@@ -26,7 +26,7 @@ fi
pwd=`pwd`
t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
-trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0
+trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0
trap '(exit $?); exit $?' 1 2 13 15
framework_failure=0
diff --git a/tests/cp/cp-i b/tests/cp/cp-i
index 119d8c862..896b0512b 100755
--- a/tests/cp/cp-i
+++ b/tests/cp/cp-i
@@ -28,7 +28,7 @@ fi
pwd=`pwd`
t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
-trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0
+trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0
trap '(exit $?); exit $?' 1 2 13 15
framework_failure=0
diff --git a/tests/cp/cp-mv-backup b/tests/cp/cp-mv-backup
index 3dc2c2a7c..cfbee41cc 100755
--- a/tests/cp/cp-mv-backup
+++ b/tests/cp/cp-mv-backup
@@ -1,7 +1,7 @@
#!/bin/sh
# Test basic --backup functionality for both cp and mv.
-# Copyright (C) 1999, 2000, 2002, 2004 Free Software Foundation, Inc.
+# Copyright (C) 1999, 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
@@ -36,7 +36,7 @@ umask 022
pwd=`pwd`
t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
-trap 'status=$?; cd $pwd; exec 1>&2; rm -rf $t0 && exit $status' 0
+trap 'status=$?; cd "$pwd" && exec 1>&2; rm -rf $t0 && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
framework_failure=0
diff --git a/tests/cp/cp-parents b/tests/cp/cp-parents
index 0081d67c2..fd3e1fcb7 100755
--- a/tests/cp/cp-parents
+++ b/tests/cp/cp-parents
@@ -2,7 +2,7 @@
# cp -R --parents dir-specified-with-trailing-slash/ other-dir
# would get a failed assertion.
-# Copyright (C) 2000, 2002, 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2002, 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
@@ -28,7 +28,7 @@ umask 022
pwd=`pwd`
t0=`echo "$0"|sed 's,.*/,,'`.tmp;tmp=$t0/$$
-trap 'status=$?; cd $pwd; exec 1>&2; rm -rf $t0 && exit $status' 0
+trap 'status=$?; cd "$pwd" && exec 1>&2; rm -rf $t0 && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
framework_failure=0
@@ -36,7 +36,7 @@ framework_failure=0
# Record absolute path of srcdir and cd back to current dir.
cd $srcdir || framework_failure=1
abs_srcdir=`pwd`
-cd $pwd || framework_failure=1
+cd "$pwd" || framework_failure=1
. $srcdir/../envvar-check
. $srcdir/../umask-check
diff --git a/tests/cp/deref-slink b/tests/cp/deref-slink
index 1f9eecb36..6034af6b5 100755
--- a/tests/cp/deref-slink
+++ b/tests/cp/deref-slink
@@ -2,7 +2,7 @@
# Demonstrate bug when using -d with an existing destination file
# that is a symlink.
-# Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc.
+# 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
@@ -29,7 +29,7 @@ fi
pwd=`pwd`
t0=`echo "$0"|sed 's,.*/,,'`.tmp;tmp=$t0/$$
-trap 'status=$?; cd $pwd; rm -rf $t0 && exit $status' 0
+trap 'status=$?; cd "$pwd" && rm -rf $t0 && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
framework_failure=0
diff --git a/tests/cp/dir-rm-dest b/tests/cp/dir-rm-dest
index da55bf660..325b40c2f 100755
--- a/tests/cp/dir-rm-dest
+++ b/tests/cp/dir-rm-dest
@@ -1,7 +1,7 @@
#!/bin/sh
# verify that cp's --remove-destination option works with -R
-# Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc.
+# 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
@@ -25,7 +25,7 @@ fi
pwd=`pwd`
t0=`echo "$0"|sed 's,.*/,,'`.tmp;tmp=$t0/$$
-trap 'status=$?; cd $pwd; rm -rf $t0 && exit $status' 0
+trap 'status=$?; cd "$pwd" && rm -rf $t0 && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
framework_failure=0
diff --git a/tests/cp/dir-slash b/tests/cp/dir-slash
index d34c51ecb..2c5a0bc7c 100755
--- a/tests/cp/dir-slash
+++ b/tests/cp/dir-slash
@@ -2,7 +2,7 @@
# Make sure that cp -R DIR1 DIR2 does the right thing
# when DIR1 is written with a trailing slash.
-# Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc.
+# 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
@@ -26,7 +26,7 @@ fi
pwd=`pwd`
t0=`echo "$0"|sed 's,.*/,,'`.tmp;tmp=$t0/$$
-trap 'status=$?; cd $pwd; rm -rf $t0 || exit $?; exit $status' 0
+trap 'status=$?; cd "$pwd" && rm -rf $t0 || exit $?; exit $status' 0
trap 'exit $?' 1 2 13 15
framework_failure=0
diff --git a/tests/cp/dir-vs-file b/tests/cp/dir-vs-file
index ce334fcef..612e297ad 100755
--- a/tests/cp/dir-vs-file
+++ b/tests/cp/dir-vs-file
@@ -1,7 +1,7 @@
#!/bin/sh
# A directory may not replace an existing file.
-# Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2001, 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
@@ -27,7 +27,7 @@ fi
pwd=`pwd`
t0=`echo "$0"|sed 's,.*/,,'`.tmp;tmp=$t0/$$
-trap 'status=$?; cd $pwd; rm -rf $t0 && exit $status' 0
+trap 'status=$?; cd "$pwd" && rm -rf $t0 && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
framework_failure=0
diff --git a/tests/cp/fail-perm b/tests/cp/fail-perm
index bf077e05f..5fff090cd 100755
--- a/tests/cp/fail-perm
+++ b/tests/cp/fail-perm
@@ -28,7 +28,7 @@ PRIV_CHECK_ARG=require-non-root . $srcdir/../priv-check
pwd=`pwd`
t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
-trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0
+trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
framework_failure=0
diff --git a/tests/cp/into-self b/tests/cp/into-self
index dcada77f3..79c727a8d 100755
--- a/tests/cp/into-self
+++ b/tests/cp/into-self
@@ -1,7 +1,7 @@
#!/bin/sh
# Confirm that copying a directory into itself gets a proper diagnostic.
-# Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2001, 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
@@ -33,7 +33,7 @@ fi
pwd=`pwd`
t0=`echo "$0"|sed 's,.*/,,'`.tmp;tmp=$t0/$$
-trap 'status=$?; cd $pwd; rm -rf $t0 && exit $status' 0
+trap 'status=$?; cd "$pwd" && rm -rf $t0 && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
framework_failure=0
diff --git a/tests/cp/link b/tests/cp/link
index a1e1f6a3c..f448b5e65 100755
--- a/tests/cp/link
+++ b/tests/cp/link
@@ -2,7 +2,7 @@
# Make sure cp --link -f works when the target exists.
# This failed for 4.0z (due to a bug introduced in that test release).
-# Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc.
+# 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
@@ -26,7 +26,7 @@ fi
pwd=`pwd`
t0=`echo "$0"|sed 's,.*/,,'`.tmp;tmp=$t0/$$
-trap 'status=$?; cd $pwd; rm -rf $t0 && exit $status' 0
+trap 'status=$?; cd "$pwd" && rm -rf $t0 && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
framework_failure=0
diff --git a/tests/cp/link-no-deref b/tests/cp/link-no-deref
index b1ee5004d..39f8bb9c4 100755
--- a/tests/cp/link-no-deref
+++ b/tests/cp/link-no-deref
@@ -25,7 +25,7 @@ fi
pwd=`pwd`
t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
-trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0
+trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0
trap '(exit $?); exit $?' 1 2 13 15
framework_failure=0
diff --git a/tests/cp/link-preserve b/tests/cp/link-preserve
index 8fbeff0d2..8fec65dea 100755
--- a/tests/cp/link-preserve
+++ b/tests/cp/link-preserve
@@ -2,7 +2,7 @@
# ensure that `cp -d' preserves hard-links between command line arguments
# ensure that --preserve=links works with -RH and -RL
-# Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2001, 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
@@ -29,7 +29,7 @@ fi
pwd=`pwd`
t0=`echo "$0"|sed 's,.*/,,'`.tmp;tmp=$t0/$$
-trap 'status=$?; cd $pwd; rm -rf $t0 && exit $status' 0
+trap 'status=$?; cd "$pwd" && rm -rf $t0 && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
framework_failure=0
diff --git a/tests/cp/no-deref-link1 b/tests/cp/no-deref-link1
index b3c1c3532..a8c499e45 100755
--- a/tests/cp/no-deref-link1
+++ b/tests/cp/no-deref-link1
@@ -2,7 +2,7 @@
# FIXME: This test requires ln -s.
# cp from 3.16 fails this test
-# Copyright (C) 1997, 1999, 2002, 2004 Free Software Foundation, Inc.
+# Copyright (C) 1997, 1999, 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
@@ -26,7 +26,7 @@ fi
pwd=`pwd`
t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
-trap 'status=$?; cd $pwd; rm -rf $t0 && exit $status' 0
+trap 'status=$?; cd "$pwd" && rm -rf $t0 && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
framework_failure=0
diff --git a/tests/cp/no-deref-link2 b/tests/cp/no-deref-link2
index 90e615df2..57b4f4194 100755
--- a/tests/cp/no-deref-link2
+++ b/tests/cp/no-deref-link2
@@ -2,7 +2,7 @@
# FIXME: This test requires ln -s.
# cp from 3.16 fails this test
-# Copyright (C) 1997, 1999, 2002, 2004 Free Software Foundation, Inc.
+# Copyright (C) 1997, 1999, 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
@@ -26,7 +26,7 @@ fi
pwd=`pwd`
t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
-trap 'status=$?; cd $pwd; rm -rf $t0 && exit $status' 0
+trap 'status=$?; cd "$pwd" && rm -rf $t0 && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
framework_failure=0
diff --git a/tests/cp/no-deref-link3 b/tests/cp/no-deref-link3
index e93ee7392..98e2ae923 100755
--- a/tests/cp/no-deref-link3
+++ b/tests/cp/no-deref-link3
@@ -2,7 +2,7 @@
# FIXME: This test requires ln -s.
# cp from 3.16 fails this test
-# Copyright (C) 1997, 1999, 2002, 2004 Free Software Foundation, Inc.
+# Copyright (C) 1997, 1999, 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
@@ -26,7 +26,7 @@ fi
pwd=`pwd`
t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
-trap 'status=$?; cd $pwd; rm -rf $t0 && exit $status' 0
+trap 'status=$?; cd "$pwd" && rm -rf $t0 && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
framework_failure=0
diff --git a/tests/cp/perm b/tests/cp/perm
index 2499554bc..502ce70e3 100755
--- a/tests/cp/perm
+++ b/tests/cp/perm
@@ -1,7 +1,7 @@
#!/bin/sh
# Make sure the permission-preserving code in copy.c (mv, cp, install) works.
-# Copyright (C) 2000, 2002, 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2002, 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
@@ -30,7 +30,7 @@ fi
pwd=`pwd`
t0=`echo "$0"|sed 's,.*/,,'`.tmp;tmp=$t0/$$
-trap 'status=$?; cd $pwd; rm -rf $t0 && exit $status' 0
+trap 'status=$?; cd "$pwd" && rm -rf $t0 && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
framework_failure=0
diff --git a/tests/cp/preserve-2 b/tests/cp/preserve-2
index 57816d220..85f9e1e6f 100755
--- a/tests/cp/preserve-2
+++ b/tests/cp/preserve-2
@@ -1,7 +1,7 @@
#!/bin/sh
# ensure that cp's --preserve=X,Y option is parsed properly
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 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
@@ -25,7 +25,7 @@ fi
pwd=`pwd`
t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
-trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0
+trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0
trap '(exit $?); exit $?' 1 2 13 15
framework_failure=0
diff --git a/tests/cp/r-vs-symlink b/tests/cp/r-vs-symlink
index 3869507d6..9601fb619 100755
--- a/tests/cp/r-vs-symlink
+++ b/tests/cp/r-vs-symlink
@@ -1,7 +1,7 @@
#!/bin/sh
# cp -r should not create symlinks. Fixed in fileutils-4.1.5.
-# Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2001, 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
@@ -31,7 +31,7 @@ fi
pwd=`pwd`
t0=`echo "$0"|sed 's,.*/,,'`.tmp;tmp=$t0/$$
-trap 'status=$?; cd $pwd; rm -rf $t0 && exit $status' 0
+trap 'status=$?; cd "$pwd" && rm -rf $t0 && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
framework_failure=0
diff --git a/tests/cp/same-file b/tests/cp/same-file
index 05a0e75c0..44d5dd74c 100755
--- a/tests/cp/same-file
+++ b/tests/cp/same-file
@@ -36,7 +36,7 @@ VERSION_CONTROL=numbered; export VERSION_CONTROL
pwd=`pwd`
t0=`echo "$0"|sed 's,.*/,,'`.tmp;tmp=$t0/$$
-trap 'status=$?; cd $pwd; exec 1>&2; rm -rf $t0 && exit $status' 0
+trap 'status=$?; cd "$pwd" && exec 1>&2; rm -rf $t0 && exit $status' 0
trap 'exit $?' 1 2 13 15
framework_failure=0
diff --git a/tests/cp/slink-2-slink b/tests/cp/slink-2-slink
index 1d328349f..c36b88205 100755
--- a/tests/cp/slink-2-slink
+++ b/tests/cp/slink-2-slink
@@ -2,7 +2,7 @@
# `test cp --update A B' where A and B are both symlinks that point
# to the same file
-# Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc.
+# 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
@@ -31,7 +31,7 @@ fi
pwd=`pwd`
t0=`echo "$0"|sed 's,.*/,,'`.tmp;tmp=$t0/$$
-trap 'status=$?; cd $pwd; rm -rf $t0 && exit $status' 0
+trap 'status=$?; cd "$pwd" && rm -rf $t0 && exit $status' 0
trap 'exit $?' 1 2 13 15
framework_failure=0
diff --git a/tests/cp/sparse b/tests/cp/sparse
index 2842513b0..98d580d21 100755
--- a/tests/cp/sparse
+++ b/tests/cp/sparse
@@ -28,7 +28,7 @@ fi
pwd=`pwd`
t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
-trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0
+trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0
trap '(exit $?); exit $?' 1 2 13 15
framework_failure=0
diff --git a/tests/cp/special-bits b/tests/cp/special-bits
index c3217ff58..6a9b0949d 100755
--- a/tests/cp/special-bits
+++ b/tests/cp/special-bits
@@ -2,7 +2,7 @@
# make sure `cp -p' preserves special bits
# This works only when run as root.
-# Copyright (C) 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 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
@@ -31,7 +31,7 @@ PRIV_CHECK_ARG=require-root . $srcdir/../priv-check
pwd=`pwd`
t0=`echo "$0"|sed 's,.*/,,'`.tmp;tmp=$t0/$$
-trap 'status=$?; cd $pwd; rm -rf $t0 && exit $status' 0
+trap 'status=$?; cd "$pwd" && rm -rf $t0 && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
framework_failure=0
diff --git a/tests/cp/src-base-dot b/tests/cp/src-base-dot
index 4b4a586da..1af0e5794 100755
--- a/tests/cp/src-base-dot
+++ b/tests/cp/src-base-dot
@@ -27,7 +27,7 @@ fi
pwd=`pwd`
t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
-trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0
+trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0
trap '(exit $?); exit $?' 1 2 13 15
framework_failure=0
diff --git a/tests/cp/symlink-slash b/tests/cp/symlink-slash
index e99dcdfe6..311775a85 100755
--- a/tests/cp/symlink-slash
+++ b/tests/cp/symlink-slash
@@ -2,7 +2,7 @@
# Make sure that cp -dR dereferences a symlink arg if its name is
# written with a trailing slash.
-# Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc.
+# 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
@@ -29,7 +29,7 @@ fi
pwd=`pwd`
t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
-trap 'status=$?; cd $pwd; rm -rf $t0 && exit $status' 0
+trap 'status=$?; cd "$pwd" && rm -rf $t0 && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
framework_failure=0