]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: adapt tests to change in pwd's default
authorJim Meyering <meyering@fb.com>
Tue, 1 Jul 2014 15:32:57 +0000 (08:32 -0700)
committerJim Meyering <meyering@fb.com>
Tue, 1 Jul 2014 16:44:41 +0000 (09:44 -0700)
* tests/misc/pwd-option.sh (base): Initialize with -P,
now that -L is the default, to accommodate an initial
working directory with a symlink component.
* tests/misc/readlink-fp-loop.sh: Use $(env pwd -P) to get the
absolute working directory.  Using "env" ensures we do not invoke
any shell built-in, and PATH ensures we invoke the one from coreutils.
* tests/readlink/can-e.sh: Likewise.
* tests/readlink/can-f.sh: Likewise.
* tests/readlink/can-m.sh: Likewise.

tests/misc/pwd-option.sh
tests/misc/readlink-fp-loop.sh
tests/readlink/can-e.sh
tests/readlink/can-f.sh
tests/readlink/can-m.sh

index 983726b66a707f2f8333bc2c2d3a6ae036be3693..9b4664d34a0b031b57a81418f87cba533be2a017 100755 (executable)
@@ -21,7 +21,7 @@ print_ver_ pwd
 
 mkdir -p a/b || framework_failure_
 ln -s a/b c || framework_failure_
-base=$(env -- pwd)
+base=$(env -- pwd -P)
 
 # Remove any logical paths from $PWD.
 cd "$base" || framework_failure_
index 286da6ffb68a1ad379f77619c19451f11db872f8..4ae2dc523e4b06fc27b5dae5250c119b4532d900 100755 (executable)
@@ -18,7 +18,7 @@
 
 . "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ readlink
-cwd=$("$abs_top_builddir/src/pwd")
+cwd=$(env pwd -P)
 
 # To trigger this bug, we have to construct a name/situation during
 # the resolution of which the code dereferences the same symlink (S)
index 7da45f7c108b0a111341dc6b473f22927814336e..a6415b94bd770aa672de3f3cc66d1db3300a0a43 100755 (executable)
@@ -20,7 +20,7 @@
 print_ver_ readlink
 
 pwd=$(pwd)
-my_pwd=$("$abs_top_builddir/src/pwd")
+my_pwd=$(env pwd -P)
 tmp=d
 
 mkdir $tmp || framework_failure_
index 27fcb78bc7f3d2a6eacb1e5069f9247e944c1516..2a980fa841dc21a6a4061f0f7102c1be8deac2b4 100755 (executable)
@@ -20,7 +20,7 @@
 print_ver_ readlink
 
 pwd=$(pwd)
-my_pwd=$("$abs_top_builddir/src/pwd")
+my_pwd=$(env pwd -P)
 tmp=d
 
 mkdir $tmp || framework_failure_
index 55ab4f2a5c7d37d462dca5c8be782d18cfe98417..768c552bbdb24f32def3bd0a98456a5dd803c26a 100755 (executable)
@@ -20,7 +20,7 @@
 print_ver_ readlink
 
 pwd=$(pwd)
-my_pwd=$("$abs_top_builddir/src/pwd")
+my_pwd=$(env pwd -P)
 tmp=d
 
 mkdir $tmp || framework_failure_