sharness/t0010: quote error messages
License: MIT Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Christian Couder committed
Mar 20, 2018 at 22:21 UTC
30039a78b2489410ceaf69c5920ae2b706286478
1 file changed
+4
-4
test/sharness/t0010-basic-commands.sh
+4
-4
@@ -66,7 +66,7 @@ test_expect_success "All commands accept --help" '
66
while read -r cmd
67
do
68
$cmd --help </dev/null >/dev/null ||
69
- { echo $cmd doesnt accept --help; echo 1 > fail; }
69
+ { echo "$cmd doesnt accept --help"; echo 1 > fail; }
70
done <commands.txt
71
72
if [ $(cat fail) = 1 ]; then
@@ -80,7 +80,7 @@ test_expect_failure "All ipfs root commands are mentioned in base helptext" '
80
while read cmd
81
do
82
grep " $cmd" help.txt > /dev/null ||
83
- { echo missing $cmd from helptext; echo 1 > fail; }
83
+ { echo "missing $cmd from helptext"; echo 1 > fail; }
84
done
85
86
if [ $(cat fail) = 1 ]; then
@@ -94,7 +94,7 @@ test_expect_failure "All ipfs commands docs are 80 columns or less" '
94
do
95
LENGTH="$($cmd --help | awk "{ print length }" | sort -nr | head -1)"
96
[ $LENGTH -gt 80 ] &&
97
- { echo "$cmd" help text is longer than 79 chars "($LENGTH)"; echo 1 > fail; }
97
+ { echo "$cmd help text is longer than 79 chars ($LENGTH)"; echo 1 > fail; }
98
done <commands.txt
99
100
if [ $(cat fail) = 1 ]; then
@@ -107,7 +107,7 @@ test_expect_success "All ipfs commands fail when passed a bad flag" '
107
while read -r cmd
108
do
109
test_must_fail $cmd --badflag >/dev/null ||
110
- { echo $cmd exit with code 0 when passed --badflag; echo 1 > fail; }
110
+ { echo "$cmd exit with code 0 when passed --badflag"; echo 1 > fail; }
111
done <commands.txt
112
113
if [ $(cat fail) = 1 ]; then