about summary refs log tree commit diff
path: root/localedata/tst-numeric.sh
diff options
context:
space:
mode:
Diffstat (limited to 'localedata/tst-numeric.sh')
-rw-r--r--localedata/tst-numeric.sh12
1 files changed, 7 insertions, 5 deletions
diff --git a/localedata/tst-numeric.sh b/localedata/tst-numeric.sh
index f590dfd042..f27eacd078 100644
--- a/localedata/tst-numeric.sh
+++ b/localedata/tst-numeric.sh
@@ -25,25 +25,27 @@ run_program_prefix=$2
 datafile=$3
 
 # Run the tests.
+errcode=0
 # There's a TAB for IFS
 while IFS="	" read locale format value expect; do
     case "$locale" in '#'*) continue ;; esac
     if [ -n "$format" ]; then
-	LOCPATH=${common_objpfx}localedata \
-	GCONV_PATH=${common_objpfx}/iconvdata \
-	${run_program_prefix} ${common_objpfx}localedata/tst-numeric \
+	if LOCPATH=${common_objpfx}localedata \
+	    GCONV_PATH=${common_objpfx}/iconvdata \
+	    ${run_program_prefix} ${common_objpfx}localedata/tst-numeric \
 	    "$locale" "$format" "$value" "$expect"
-	if [ $? -eq 0 ]; then
+	then
 	    echo "Locale: \"${locale}\" Format: \"${format}\"" \
 		 "Value: \"${value}\" Expect: \"${expect}\"  passed"
 	else
+	    errcode=$?
 	    echo "Locale: \"${locale}\" Format: \"${format}\"" \
 		 "Value: \"${value}\" Expect: \"${expect}\"    failed"
 	fi
     fi
 done < $datafile
 
-exit $?
+exit $errcode
 # Local Variables:
 #  mode:shell-script
 # End: