summaryrefslogtreecommitdiff
path: root/tests/cp
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2006-10-22 19:37:31 +0200
committerJim Meyering <jim@meyering.net>2006-10-22 19:37:31 +0200
commit2457af43cf6d670ab120c19bf4f23ac545ff24b5 (patch)
tree72e286663db916c5c42078075667d1ed1ade831d /tests/cp
parentf5417daca01691c0e6b409e39a534eb5e0f865d7 (diff)
downloadcoreutils-2457af43cf6d670ab120c19bf4f23ac545ff24b5.tar.xz
* tests/sample-test: Quote variables containing absolute build
tree paths. In the cleanup trap, make sure `cd' succeeds before `chmod'ing and `rm'ing the temporary files. * tests/chgrp/basic: Likewise. * tests/chgrp/deref: Likewise. * tests/chgrp/no-x: Likewise. * tests/chgrp/posix-H: Likewise. * tests/chgrp/recurse: Likewise. * tests/chmod/c-option: Likewise. * tests/chmod/equal-x: Likewise. * tests/chmod/equals: Likewise. * tests/chmod/inaccessible: Likewise. * tests/chmod/no-x: Likewise. * tests/chmod/octal: Likewise. * tests/chmod/setgid: Likewise. * tests/chmod/umask-x: Likewise. * tests/chmod/usage: Likewise. * tests/chown/basic: Likewise. * tests/chown/deref: Likewise. * tests/chown/separator: Likewise. * tests/cp/acl: Likewise. * tests/cp/backup-1: Likewise. * tests/cp/backup-dir: Likewise. * tests/cp/backup-is-src: Likewise. * tests/cp/cp-HL: Likewise. * tests/cp/cp-deref: Likewise. * tests/cp/cp-i: Likewise. * tests/cp/cp-mv-backup: Likewise. * tests/cp/cp-parents: Likewise. * tests/cp/deref-slink: Likewise. * tests/cp/dir-rm-dest: Likewise. * tests/cp/dir-slash: Likewise. * tests/cp/dir-vs-file: Likewise. * tests/cp/fail-perm: Likewise. * tests/cp/into-self: Likewise. * tests/cp/link: Likewise. * tests/cp/link-no-deref: Likewise. * tests/cp/link-preserve: Likewise. * tests/cp/no-deref-link1: Likewise. * tests/cp/no-deref-link2: Likewise. * tests/cp/no-deref-link3: Likewise. * tests/cp/perm: Likewise. * tests/cp/preserve-2: Likewise. * tests/cp/r-vs-symlink: Likewise. * tests/cp/same-file: Likewise. * tests/cp/slink-2-slink: Likewise. * tests/cp/sparse: Likewise. * tests/cp/special-bits: Likewise. * tests/cp/src-base-dot: Likewise. * tests/cp/symlink-slash: Likewise. * tests/dd/not-rewound: Likewise. * tests/dd/skip-seek2: Likewise. * tests/dd/unblock-sync: Likewise. * tests/du/2g: Likewise. * tests/du/8gb: Likewise. * tests/du/basic: Likewise. * tests/du/deref: Likewise. * tests/du/deref-args: Likewise. * tests/du/exclude: Likewise. * tests/du/fd-leak: Likewise. * tests/du/hard-link: Likewise. * tests/du/inaccessible-cwd: Likewise. * tests/du/long-from-unreadable: Likewise. * tests/du/long-sloop: Likewise. * tests/du/no-deref: Likewise. * tests/du/no-x: Likewise. * tests/du/restore-wd: Likewise. * tests/du/slash: Likewise. * tests/du/slink: Likewise. * tests/du/trailing-slash: Likewise. * tests/du/two-args: Likewise. * tests/fmt/long-line: Likewise. * tests/install/basic-1: Likewise. * tests/install/create-leading: Likewise. * tests/install/d-slashdot: Likewise. * tests/install/trap: Likewise. * tests/ln/misc: Likewise. * tests/ln/target-1: Likewise. * tests/ls/color-dtype-dir: Likewise. * tests/ls/dangle: Likewise. * tests/ls/dired: Likewise. * tests/ls/file-type: Likewise. * tests/ls/follow-slink: Likewise. * tests/ls/infloop: Likewise. * tests/ls/inode: Likewise. * tests/ls/m-option: Likewise. * tests/ls/no-arg: Likewise. * tests/ls/recursive: Likewise. * tests/ls/rt-1: Likewise. * tests/ls/stat-dtype: Likewise. * tests/ls/stat-failed: Likewise. * tests/ls/stat-vs-dirent: Likewise. * tests/misc/cat-proc: Likewise. * tests/misc/close-stdout: Likewise. * tests/misc/csplit: Likewise. * tests/misc/date-sec: Likewise. * tests/misc/false-status: Likewise. * tests/misc/head-c: Likewise. * tests/misc/head-pos: Likewise. * tests/misc/mknod: Likewise. * tests/misc/nl: Likewise. * tests/misc/nohup: Likewise. * tests/misc/pathchk1: Likewise. * tests/misc/printf: Likewise. * tests/misc/printf-hex: Likewise. * tests/misc/pwd-long: Likewise. * tests/misc/shuf: Likewise. * tests/misc/sort-rand: Likewise. * tests/misc/split-a: Likewise. * tests/misc/split-fail: Likewise. * tests/misc/split-l: Likewise. * tests/misc/stat-fmt: Likewise. * tests/misc/tac-continue: Likewise. * tests/misc/wc-files0: Likewise. * tests/mkdir/concurrent-1: Likewise. * tests/mkdir/p-1: Likewise. * tests/mkdir/p-2: Likewise. * tests/mkdir/p-3: Likewise. * tests/mkdir/p-slashdot: Likewise. * tests/mkdir/p-thru-slink: Likewise. * tests/mkdir/p-v: Likewise. * tests/mkdir/parents: Likewise. * tests/mkdir/perm: Likewise. * tests/mkdir/t-slash: Likewise. * tests/mv/acl: Likewise. * tests/mv/atomic: Likewise. * tests/mv/backup-dir: Likewise. * tests/mv/childproof: Likewise. * tests/mv/diag: Likewise. * tests/mv/dir-file: Likewise. * tests/mv/dir2dir: Likewise. * tests/mv/dup-source: Likewise. * tests/mv/hard-2: Likewise. * tests/mv/hard-3: Likewise. * tests/mv/hard-4: Likewise. * tests/mv/hard-link-1: Likewise. * tests/mv/hard-verbose: Likewise. * tests/mv/i-2: Likewise. * tests/mv/i-3: Likewise. * tests/mv/i-4: Likewise. * tests/mv/i-5: Likewise. * tests/mv/i-link-no: Likewise. * tests/mv/into-self-4: Likewise. * tests/mv/leak-fd: Likewise. * tests/mv/mv-special-1: Likewise. * tests/mv/no-target-dir: Likewise. * tests/mv/part-fail: Likewise. * tests/mv/part-hardlink: Likewise. * tests/mv/part-rename: Likewise. * tests/mv/part-symlink: Likewise. * tests/mv/partition-perm: Likewise. * tests/mv/perm-1: Likewise. * tests/mv/reply-no: Likewise. * tests/mv/trailing-slash: Likewise. * tests/mv/update: Likewise. * tests/od/od-N: Likewise. * tests/od/x8: Likewise. * tests/readlink/can-e: Likewise. * tests/readlink/can-f: Likewise. * tests/readlink/can-m: Likewise. * tests/readlink/rl-1: Likewise. * tests/rm/cycle: Likewise. * tests/rm/dangling-symlink: Likewise. * tests/rm/deep-1: Likewise. * tests/rm/dir-no-w: Likewise. * tests/rm/dir-nonrecur: Likewise. * tests/rm/dot-rel: Likewise. * tests/rm/empty-inacc: Likewise. * tests/rm/f-1: Likewise. * tests/rm/fail-2eperm: Likewise. * tests/rm/hash: Likewise. * tests/rm/i-1: Likewise. * tests/rm/i-no-r: Likewise. * tests/rm/ignorable: Likewise. * tests/rm/inaccessible: Likewise. * tests/rm/interactive-always: Likewise. * tests/rm/interactive-once: Likewise. * tests/rm/ir-1: Likewise. * tests/rm/isatty: Likewise. * tests/rm/no-give-up: Likewise. * tests/rm/r-1: Likewise. * tests/rm/r-2: Likewise. * tests/rm/r-3: Likewise. * tests/rm/r-4: Likewise. * tests/rm/readdir-bug: Likewise. * tests/rm/rm1: Likewise. * tests/rm/rm2: Likewise. * tests/rm/rm3: Likewise. * tests/rm/rm4: Likewise. * tests/rm/rm5: Likewise. * tests/rm/sunos-1: Likewise. * tests/rm/unread2: Likewise. * tests/rm/unread3: Likewise. * tests/rmdir/fail-perm: Likewise. * tests/rmdir/t-slash: Likewise. * tests/shred/exact: Likewise. * tests/shred/remove: Likewise. * tests/sum/sysv: Likewise. * tests/tail-2/append-only: Likewise. * tests/tail-2/assert: Likewise. * tests/tail-2/assert-2: Likewise. * tests/tail-2/big-4gb: Likewise. * tests/tail-2/fflush: Likewise. * tests/tail-2/infloop-1: Likewise. * tests/tail-2/proc-ksyms: Likewise. * tests/tail-2/start-middle: Likewise. * tests/tail-2/tail-n0f: Likewise. * tests/tee/basic: Likewise. * tests/tee/dash: Likewise. * tests/touch/fail-diag: Likewise. * tests/touch/no-create-missing: Likewise. * tests/touch/not-owner: Likewise. * tests/touch/obsolescent: Likewise. * tests/touch/read-only: Likewise. * tests/touch/relative: Likewise.
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