Module Name:    src
Committed By:   sjg
Date:           Fri Apr 23 15:43:28 UTC 2010

Modified Files:
        src/usr.bin/make/unit-tests: modmisc test.exp

Log Message:
PR: 42850
Reviewed by:

Reduced the "expected to exist" dirs in path to just
/ /bin and /tmp
and change the "not expected to exist" dir to something
even less likely.
Add a comment to suggest why.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/make/unit-tests/modmisc
cvs rdiff -u -r1.33 -r1.34 src/usr.bin/make/unit-tests/test.exp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/unit-tests/modmisc
diff -u src/usr.bin/make/unit-tests/modmisc:1.5 src/usr.bin/make/unit-tests/modmisc:1.6
--- src/usr.bin/make/unit-tests/modmisc:1.5	Thu Apr 22 19:15:24 2010
+++ src/usr.bin/make/unit-tests/modmisc	Fri Apr 23 15:43:28 2010
@@ -1,8 +1,10 @@
-# $Id: modmisc,v 1.5 2010/04/22 19:15:24 sjg Exp $
+# $Id: modmisc,v 1.6 2010/04/23 15:43:28 sjg Exp $
 #
 # miscellaneous modifier tests
 
-path=:/bin:/usr/bin::/:.:/user/bin:.
+# do not put any dirs in this list which exist on some
+# but not all target systems - an exists() check is below.
+path=:/bin:/tmp::/:.:/no/such/dir:.
 # strip cwd from path.
 MOD_NODOT=S/:/ /g:N.:ts:
 # and decorate, note that $'s need to be doubled. Also note that 

Index: src/usr.bin/make/unit-tests/test.exp
diff -u src/usr.bin/make/unit-tests/test.exp:1.33 src/usr.bin/make/unit-tests/test.exp:1.34
--- src/usr.bin/make/unit-tests/test.exp:1.33	Thu Apr 22 19:15:24 2010
+++ src/usr.bin/make/unit-tests/test.exp	Fri Apr 23 15:43:28 2010
@@ -112,14 +112,14 @@
 LIB=e X_LIBS:M*/lib${LIB}.a is "/tmp/libe.a"
 LIB=e X_LIBS:M*/lib${LIB}.a:tu is "/TMP/LIBE.A"
 Mscanner=OK
-path=':/bin:/usr/bin::/:.:/user/bin:.'
-path='/bin:/usr/bin:/:/user/bin'
-path='/bin:/usr/bin:/:/user/bin'
-path='/bin':'/usr/bin':'/':'/user/bin'
-path='/bin':'/usr/bin':'/':'/user/bin'
+path=':/bin:/tmp::/:.:/no/such/dir:.'
+path='/bin:/tmp:/:/no/such/dir'
+path='/bin:/tmp:/:/no/such/dir'
+path='/bin':'/tmp':'/':'/no/such/dir'
+path='/bin':'/tmp':'/':'/no/such/dir'
 path_/usr/xbin=/opt/xbin/
-paths=/bin /usr/bin / /user/bin /opt/xbin
-PATHS=/BIN /USR/BIN / /USER/BIN /OPT/XBIN
+paths=/bin /tmp / /no/such/dir /opt/xbin
+PATHS=/BIN /TMP / /NO/SUCH/DIR /OPT/XBIN
 LIST      = one two three four five six seven eight nine ten
 LIST:O    = eight five four nine one seven six ten three two
 LIST:Ox   = Ok

Reply via email to