about summary refs log tree commit diff
path: root/posix
diff options
context:
space:
mode:
Diffstat (limited to 'posix')
-rw-r--r--posix/Makefile3
-rw-r--r--posix/tst-getconf.sh6
-rwxr-xr-xposix/wordexp-tst.sh34
3 files changed, 25 insertions, 18 deletions
diff --git a/posix/Makefile b/posix/Makefile
index 3d7597114f..14e6ceeaf6 100644
--- a/posix/Makefile
+++ b/posix/Makefile
@@ -143,7 +143,8 @@ $(objpfx)globtest.out: globtest.sh $(objpfx)globtest
 		'$(test-program-prefix)' '$(test-wrapper-env)'; \
 	$(evaluate-test)
 $(objpfx)wordexp-tst.out: wordexp-tst.sh $(objpfx)wordexp-test
-	$(SHELL) $< $(common-objpfx) '$(test-program-prefix)'; \
+	$(SHELL) $< $(common-objpfx) '$(test-program-prefix-before-env)' \
+		 '$(run-program-env)' '$(test-program-prefix-after-env)'; \
 	$(evaluate-test)
 endif
 endif
diff --git a/posix/tst-getconf.sh b/posix/tst-getconf.sh
index 1cbebc5b68..0f770c40d0 100644
--- a/posix/tst-getconf.sh
+++ b/posix/tst-getconf.sh
@@ -24,12 +24,6 @@ run_getconf=$1; shift
 
 logfile=$common_objpfx/posix/tst-getconf.out
 
-# Since we use `sort' we must make sure to use the same locale everywhere.
-LC_ALL=C
-export LC_ALL
-LANG=C
-export LANG
-
 rm -f $logfile
 result=0
 while read name; do
diff --git a/posix/wordexp-tst.sh b/posix/wordexp-tst.sh
index 392feb0966..2ed239b4cf 100755
--- a/posix/wordexp-tst.sh
+++ b/posix/wordexp-tst.sh
@@ -24,7 +24,9 @@ set -e
 # The others are just there to be parameters.
 
 common_objpfx=$1; shift
-test_program_prefix=$1; shift
+test_program_prefix_before_env=$1; shift
+run_program_env=$1; shift
+test_program_prefix_after_env=$1; shift
 logfile=${common_objpfx}posix/wordexp-tst.out
 testout=${common_objpfx}posix/wordexp-test-result
 
@@ -38,7 +40,8 @@ IFS=" 	\
 export IFS
 
 failed=0
-${test_program_prefix} \
+${test_program_prefix_before_env} ${run_program_env} IFS="$IFS" \
+${test_program_prefix_after_env} \
 ${common_objpfx}posix/wordexp-test '$*' > ${testout}1
 cat <<"EOF" | cmp - ${testout}1 >> $logfile || failed=1
 wordexp returned 0
@@ -50,7 +53,8 @@ if test $failed -ne 0; then
 fi
 
 failed=0
-${test_program_prefix} \
+${test_program_prefix_before_env} ${run_program_env} IFS="$IFS" \
+${test_program_prefix_after_env} \
 ${common_objpfx}posix/wordexp-test '${*}' unquoted > ${testout}2
 cat <<"EOF" | cmp - ${testout}2 >> $logfile || failed=1
 wordexp returned 0
@@ -63,7 +67,8 @@ if test $failed -ne 0; then
 fi
 
 failed=0
-${test_program_prefix} \
+${test_program_prefix_before_env} ${run_program_env} IFS="$IFS" \
+${test_program_prefix_after_env} \
 ${common_objpfx}posix/wordexp-test '$@' unquoted > ${testout}3
 cat <<"EOF" | cmp - ${testout}3 >> $logfile || failed=1
 wordexp returned 0
@@ -76,7 +81,8 @@ if test $failed -ne 0; then
 fi
 
 failed=0
-${test_program_prefix} \
+${test_program_prefix_before_env} ${run_program_env} IFS="$IFS" \
+${test_program_prefix_after_env} \
 ${common_objpfx}posix/wordexp-test '"$* quoted"' param > ${testout}4
 cat <<"EOF" | cmp - ${testout}4 >> $logfile || failed=1
 wordexp returned 0
@@ -88,7 +94,8 @@ if test $failed -ne 0; then
 fi
 
 failed=0
-${test_program_prefix} \
+${test_program_prefix_before_env} ${run_program_env} IFS="$IFS" \
+${test_program_prefix_after_env} \
 ${common_objpfx}posix/wordexp-test '"$@ quoted"' param > ${testout}5
 cat <<"EOF" | cmp - ${testout}5 >> $logfile || failed=1
 wordexp returned 0
@@ -102,7 +109,8 @@ fi
 # Why?  Because bash does it that way..
 
 failed=0
-${test_program_prefix} \
+${test_program_prefix_before_env} ${run_program_env} IFS="$IFS" \
+${test_program_prefix_after_env} \
 ${common_objpfx}posix/wordexp-test '$#' 2 3 4 5 > ${testout}6
 cat <<"EOF" | cmp - ${testout}6 >> $logfile || failed=1
 wordexp returned 0
@@ -114,7 +122,8 @@ if test $failed -ne 0; then
 fi
 
 failed=0
-${test_program_prefix} \
+${test_program_prefix_before_env} ${run_program_env} IFS="$IFS" \
+${test_program_prefix_after_env} \
 ${common_objpfx}posix/wordexp-test '$2 ${3} $4' 2nd 3rd "4 th" > ${testout}7
 cat <<"EOF" | cmp - ${testout}7 >> $logfile || failed=1
 wordexp returned 0
@@ -129,7 +138,8 @@ if test $failed -ne 0; then
 fi
 
 failed=0
-${test_program_prefix} \
+${test_program_prefix_before_env} ${run_program_env} IFS="$IFS" \
+${test_program_prefix_after_env} \
 ${common_objpfx}posix/wordexp-test '${11}' 2 3 4 5 6 7 8 9 10 11 > ${testout}8
 cat <<"EOF" | cmp - ${testout}8 >> $logfile || failed=1
 wordexp returned 0
@@ -141,7 +151,8 @@ if test $failed -ne 0; then
 fi
 
 failed=0
-${test_program_prefix} \
+${test_program_prefix_before_env} ${run_program_env} IFS="$IFS" \
+${test_program_prefix_after_env} \
 ${common_objpfx}posix/wordexp-test '"a $@ b"' c d > ${testout}9
 cat <<"EOF" | cmp - ${testout}9 >> $logfile || failed=1
 wordexp returned 0
@@ -154,7 +165,8 @@ if test $failed -ne 0; then
   status=1
 fi
 
-${test_program_prefix} \
+${test_program_prefix_before_env} ${run_program_env} IFS="$IFS" \
+${test_program_prefix_after_env} \
 ${common_objpfx}posix/wordexp-test '${#@} ${#2} *$**' two 3 4 > ${testout}10
 cat <<"EOF" | cmp - ${testout}10 || failed=1
 wordexp returned 0