← Commit list

1f27fa983

Ron Yorston
Ron Yorston
2018-04-09
SUCCESS Duration: 144s

Subject

testsuite: allow tests to work in paths containing spaces

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

testsuite/grep.tests+1 -1
@@ -15,7 +15,7 @@
testing "grep (exit with error)" "grep nonexistent 2> /dev/null ; echo \$?" \
"1\n" "" ""
-testing "grep (exit success)" "grep grep $0 > /dev/null 2>&1 ; echo \$?" "0\n" \
+testing "grep (exit success)" "grep grep '$0' > /dev/null 2>&1 ; echo \$?" "0\n" \
"" ""
# Test various data sources and destinations
testsuite/printf.tests+1 -1
@@ -20,7 +20,7 @@ testing "printf produces no further output 2" \
"" ""
testing "printf repeatedly uses pattern for each argv" \
- "${bb}printf '%s\n' foo \$HOME" \
+ "${bb}printf '%s\n' foo '$HOME'" \
"foo\n$HOME\n" \
"" ""
testsuite/pwd/pwd-prints-working-directory+1 -1
@@ -1,4 +1,4 @@
# shell's $PWD may leave symlinks unresolved.
# "pwd" may be a built-in and have the same problem.
# External pwd _can't_ have that problem (current dir on Unix is physical).
-test $(`which pwd`) = $(busybox pwd)
+test "$(`which pwd`)" = "$(busybox pwd)"
testsuite/sum.tests+3 -3
@@ -13,12 +13,12 @@
# test can create a file "actual" instead of writing to stdout
testing "sum -r file doesn't print file's name" \
- "sum -r $0 | grep -c $0 && echo wrongly_printed_filename || echo yes" \
+ "sum -r '$0' | grep -c '$0' && echo wrongly_printed_filename || echo yes" \
"0\nyes\n" "" ""
testing "sum -r file file does print both names" \
- "sum -r $0 $0 | grep -c $0 && echo yes || echo wrongly_omitted_filename" \
+ "sum -r '$0' '$0' | grep -c '$0' && echo yes || echo wrongly_omitted_filename" \
"2\nyes\n" "" ""
testing "sum -s file does print file's name" \
- "sum -s $0 | grep -c $0 && echo yes || echo wrongly_omitted_filename" \
+ "sum -s '$0' | grep -c '$0' && echo yes || echo wrongly_omitted_filename" \
"1\nyes\n" "" ""
exit $FAILCOUNT
testsuite/xargs/xargs-works+4 -2
@@ -1,4 +1,6 @@
+# FEATURE: CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM
+
[ -n "$d" ] || d=..
-find "$d" -name \*works -type f | xargs md5sum > logfile.gnu
-find "$d" -name \*works -type f | busybox xargs md5sum > logfile.bb
+find "$d" -name \*works -type f -print0 | xargs -0 md5sum > logfile.gnu
+find "$d" -name \*works -type f -print0 | busybox xargs -0 md5sum > logfile.bb
diff -u logfile.gnu logfile.bb