From 1f27fa98380c134cd0f5f03b4cd3dfe2e83c09b7 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Fri, 9 Feb 2018 09:52:52 +0000 Subject: 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 Signed-off-by: Denys Vlasenko --- testsuite/sum.tests | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'testsuite/sum.tests') diff --git a/testsuite/sum.tests b/testsuite/sum.tests index b9f4cbfa8..e6379349f 100755 --- a/testsuite/sum.tests +++ b/testsuite/sum.tests @@ -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 -- cgit v1.2.3