testsuite: allow tests to work in paths containing spaces

Tweak some tests so they work when the path to the test directory or
$HOME contains spaces.

Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Ron Yorston
2018-02-09 09:52:52 +00:00
committed by Denys Vlasenko
parent 9db344a0f4
commit 1f27fa9838
5 changed files with 10 additions and 8 deletions

View File

@@ -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