commit c3f0d5676d12c478f7af883f887177474081de36 from: Thomas Adam date: Tue Nov 23 12:54:38 2021 UTC regress: make merge.sh more POSIXy Don't use '==' for equality matching in sh, as this won't work across all shells. ok @naddy commit - 1ff9fea4adda83f98727fa90b9806f6b35989182 commit + c3f0d5676d12c478f7af883f887177474081de36 blob - 7531c5533c9965ff12fa5f05ece3f43ddbe40b15 blob + e56a0bd381bdbeb93ee755f1e1279e9598388578 --- regress/cmdline/merge.sh +++ regress/cmdline/merge.sh @@ -56,7 +56,7 @@ test_merge_basic() { (cd $testroot/wt && got merge newbranch \ > $testroot/stdout 2> $testroot/stderr) ret="$?" - if [ "$ret" == "0" ]; then + if [ "$ret" = "0" ]; then echo "got merge succeeded unexpectedly" >&2 test_done "$testroot" "1" return 1 @@ -86,7 +86,7 @@ test_merge_basic() { (cd $testroot/wt && got merge newbranch \ > $testroot/stdout 2> $testroot/stderr) ret="$?" - if [ "$ret" == "0" ]; then + if [ "$ret" = "0" ]; then echo "got merge succeeded unexpectedly" >&2 test_done "$testroot" "$ret" return 1 @@ -121,7 +121,7 @@ test_merge_basic() { (cd $testroot/wt && got merge newbranch \ > $testroot/stdout 2> $testroot/stderr) ret="$?" - if [ "$ret" == "0" ]; then + if [ "$ret" = "0" ]; then echo "got merge succeeded unexpectedly" >&2 test_done "$testroot" "$ret" return 1 @@ -158,7 +158,7 @@ test_merge_basic() { (cd $testroot/wt && got merge newbranch \ > $testroot/stdout 2> $testroot/stderr) ret="$?" - if [ "$ret" == "0" ]; then + if [ "$ret" = "0" ]; then echo "got merge succeeded unexpectedly" >&2 test_done "$testroot" "$ret" return 1 @@ -183,7 +183,7 @@ test_merge_basic() { (cd $testroot/wt && got merge newbranch \ > $testroot/stdout 2> $testroot/stderr) ret="$?" - if [ "$ret" == "0" ]; then + if [ "$ret" = "0" ]; then echo "got merge succeeded unexpectedly" >&2 test_done "$testroot" "$ret" return 1 @@ -418,7 +418,7 @@ test_merge_continue() { (cd $testroot/wt && got merge newbranch \ > $testroot/stdout 2> $testroot/stderr) ret="$?" - if [ "$ret" == "0" ]; then + if [ "$ret" = "0" ]; then echo "got merge succeeded unexpectedly" >&2 test_done "$testroot" "1" return 1 @@ -643,7 +643,7 @@ test_merge_abort() { (cd $testroot/wt && got merge newbranch \ > $testroot/stdout 2> $testroot/stderr) ret="$?" - if [ "$ret" == "0" ]; then + if [ "$ret" = "0" ]; then echo "got merge succeeded unexpectedly" >&2 test_done "$testroot" "1" return 1 @@ -824,7 +824,7 @@ test_merge_in_progress() { (cd $testroot/wt && got merge newbranch \ > $testroot/stdout 2> $testroot/stderr) ret="$?" - if [ "$ret" == "0" ]; then + if [ "$ret" = "0" ]; then echo "got merge succeeded unexpectedly" >&2 test_done "$testroot" "1" return 1 @@ -928,7 +928,7 @@ test_merge_path_prefix() { (cd $testroot/wt && got merge newbranch \ > $testroot/stdout 2> $testroot/stderr) ret="$?" - if [ "$ret" == "0" ]; then + if [ "$ret" = "0" ]; then echo "got merge succeeded unexpectedly" >&2 test_done "$testroot" "1" return 1 @@ -982,7 +982,7 @@ test_merge_missing_file() { (cd $testroot/wt && got merge newbranch \ > $testroot/stdout 2> $testroot/stderr) ret="$?" - if [ "$ret" == "0" ]; then + if [ "$ret" = "0" ]; then echo "got merge succeeded unexpectedly" >&2 test_done "$testroot" "1" return 1 @@ -1065,7 +1065,7 @@ test_merge_no_op() { (cd $testroot/wt && got merge newbranch \ > $testroot/stdout 2> $testroot/stderr) ret="$?" - if [ "$ret" == "0" ]; then + if [ "$ret" = "0" ]; then echo "got merge succeeded unexpectedly" >&2 test_done "$testroot" "1" return 1 @@ -1114,7 +1114,7 @@ test_merge_no_op() { (cd $testroot/wt && got merge -c > $testroot/stdout \ 2> $testroot/stderr) ret="$?" - if [ "$ret" == "0" ]; then + if [ "$ret" = "0" ]; then echo "got merge succeeded unexpectedly" >&2 test_done "$testroot" "$ret" return 1