commit 67d7451ca0b909687a2689243077b8d7edb65102 from: Christian Weisgerber date: Wed Sep 15 08:29:53 2021 UTC shell code fixes Escape sequences are not handled by every echo(1), e.g. not on FreeBSD. '?' is a glob character and must be quoted. '!' is not a shell meta character. ok tracey stsp commit - f0fd0aafb69cafd7c84dd294cffda4b3c1d6144a commit + 67d7451ca0b909687a2689243077b8d7edb65102 blob - 7e75429e4fe31fb4f4ec10afbd607d1b71f67721 blob + 14a25416da706b0bced0477529b71a35b28914d1 --- regress/cmdline/checkout.sh +++ regress/cmdline/checkout.sh @@ -821,7 +821,7 @@ test_checkout_quiet() { echo -n "Checked out refs/heads/master: " >> $testroot/stdout.expected git_show_head $testroot/repo >> $testroot/stdout.expected - echo "\nNow shut up and hack" >> $testroot/stdout.expected + printf "\nNow shut up and hack\n" >> $testroot/stdout.expected got checkout -q $testroot/repo $testroot/wt > $testroot/stdout ret="$?" blob - 47f3fb72e870ae3ea6d9b9aa4148243c8f217315 blob + de94a6e129b914a487c98dde2b1cc0d59698c4cd --- regress/cmdline/status.sh +++ regress/cmdline/status.sh @@ -746,7 +746,7 @@ test_status_status_code() { echo '! epsilon/zeta' > $testroot/stdout.expected echo '? foo' >> $testroot/stdout.expected - (cd $testroot/wt && got status -s \!? > $testroot/stdout) + (cd $testroot/wt && got status -s !\? > $testroot/stdout) cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then @@ -878,7 +878,7 @@ test_status_suppress() { fi echo 'M alpha' > $testroot/stdout.expected - (cd $testroot/wt && got status -S D?A\! > $testroot/stdout) + (cd $testroot/wt && got status -S D\?A! > $testroot/stdout) cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then @@ -888,7 +888,7 @@ test_status_suppress() { fi echo 'D beta' > $testroot/stdout.expected - (cd $testroot/wt && got status -S M?A\! > $testroot/stdout) + (cd $testroot/wt && got status -S M\?A! > $testroot/stdout) cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then @@ -909,7 +909,7 @@ test_status_suppress() { fi echo 'A new' > $testroot/stdout.expected - (cd $testroot/wt && got status -S MD?\! > $testroot/stdout) + (cd $testroot/wt && got status -S MD\?! > $testroot/stdout) cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then @@ -921,7 +921,7 @@ test_status_suppress() { (cd $testroot/wt && got stage new > $testroot/stdout) echo ' A new' > $testroot/stdout.expected - (cd $testroot/wt && got status -S MD?\! > $testroot/stdout) + (cd $testroot/wt && got status -S MD\?! > $testroot/stdout) cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then @@ -934,7 +934,7 @@ test_status_suppress() { echo 'M alpha' > $testroot/stdout.expected echo 'MA new' >> $testroot/stdout.expected - (cd $testroot/wt && got status -S D?\! > $testroot/stdout) + (cd $testroot/wt && got status -S D\?! > $testroot/stdout) cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then @@ -944,7 +944,7 @@ test_status_suppress() { fi echo 'M alpha' > $testroot/stdout.expected - (cd $testroot/wt && got status -S AD?\! > $testroot/stdout) + (cd $testroot/wt && got status -S AD\?! > $testroot/stdout) cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then @@ -956,7 +956,7 @@ test_status_suppress() { rm $testroot/stdout.expected touch $testroot/stdout.expected - (cd $testroot/wt && got status -S MD?\! > $testroot/stdout) + (cd $testroot/wt && got status -S MD\?! > $testroot/stdout) cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then