summaryrefslogtreecommitdiff
path: root/tests/misc/pwd-option.sh
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2014-07-02 11:28:05 +0100
committerPádraig Brady <P@draigBrady.com>2014-07-02 19:45:18 +0100
commit8e2219b09c513e6e0e8f83cca73baa05cd876f12 (patch)
treea30d9adbd0fc5032b922414318b8e490270fa317 /tests/misc/pwd-option.sh
parent07e40d5de8fe2a8276bd27f32af702e412d10206 (diff)
downloadcoreutils-8e2219b09c513e6e0e8f83cca73baa05cd876f12.tar.xz
pwd: revert default mode back to -P
Revert commit v8.22-131-g3e89d5b as even though POSIX states that the default mode should be -L, common practice for stand-alone pwd implementations is to default to -P. * src/pwd.c (usage): Retain mention of the default mode of operation. Suggested by Bob Proulx
Diffstat (limited to 'tests/misc/pwd-option.sh')
-rwxr-xr-xtests/misc/pwd-option.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/misc/pwd-option.sh b/tests/misc/pwd-option.sh
index 9b4664d34..0eba9429c 100755
--- a/tests/misc/pwd-option.sh
+++ b/tests/misc/pwd-option.sh
@@ -40,8 +40,11 @@ printf %s\\n "$base/a/b" >> exp || fail=1
env -- pwd --physical >> out || fail=1
printf %s\\n "$base/a/b" >> exp || fail=1
-# By default, we use -L like POSIX and various shells.
+# By default, we use -P unless POSIXLY_CORRECT.
env -- pwd >> out || fail=1
+printf %s\\n "$base/a/b" >> exp || fail=1
+
+env -- POSIXLY_CORRECT=1 pwd >> out || fail=1
printf %s\\n "$base/c" >> exp || fail=1
# Make sure we reject bogus values, and silently fall back to -P.