commit 1a4be2506adddbb055438ec1bf79188555514c1e from: Thomas Adam date: Fri Mar 03 22:30:43 2023 UTC regress: make cmdline tests sh compatible Ensure shell scripts can run under more POSIX-restricted shells. OK op@ commit - f55db25a40103e9990a713a4f61d37686d786194 commit + 1a4be2506adddbb055438ec1bf79188555514c1e blob - 88a6dc75585a2d1b900d0d9d747bfb9a2540b8cb blob + 86b8cddd9616882e06b859c2bd3e8de87a317150 --- regress/cmdline/backout.sh +++ regress/cmdline/backout.sh @@ -289,7 +289,7 @@ test_backout_logmsg_ref() { for r in $wt_sorted; do echo $sep >> $testroot/stdout.expected - if [ $r == $branch_rev ]; then + if [ $r = $branch_rev ]; then echo "backout $r" >> $testroot/stdout.expected echo "from: $GOT_AUTHOR" >> $testroot/stdout.expected echo "date: $date" >> $testroot/stdout.expected @@ -399,7 +399,7 @@ test_backout_logmsg_ref() { echo -n > $testroot/stdout.expected for r in $wt2_sorted; do echo $sep >> $testroot/stdout.expected - if [ $r == $branch2_rev ]; then + if [ $r = $branch2_rev ]; then echo "backout $r" >> $testroot/stdout.expected echo "from: $GOT_AUTHOR" >> $testroot/stdout.expected echo "date: $date" >> $testroot/stdout.expected @@ -437,7 +437,7 @@ test_backout_logmsg_ref() { for r in $wt_sorted; do echo -n "backout $r" >> $testroot/wt.list - if [ $r == $branch_rev2 ]; then + if [ $r = $branch_rev2 ]; then echo -n " (newbranch)" >> $testroot/wt.list fi echo >> $testroot/wt.list @@ -446,14 +446,14 @@ test_backout_logmsg_ref() { for r in $wt2_sorted; do echo -n "backout $r" >> $testroot/wt2.list - if [ $r == $branch2_rev2 ]; then + if [ $r = $branch2_rev2 ]; then echo -n " (newbranch2)" >> $testroot/wt2.list fi echo >> $testroot/wt2.list echo "work tree: $wt2_uuid" >> $testroot/wt2.list done - if [ $wt_uuid == $wt_first ]; then + if [ $wt_uuid = $wt_first ]; then mv $testroot/wt.list $testroot/stdout.expected cat $testroot/wt2.list >> $testroot/stdout.expected else blob - 5f8f09cafb0426ef5bc92fae1bf7d909c80282ad blob + 364fe8dd78d0449f3b9718c310a7ead6bddbe3a6 --- regress/cmdline/cherrypick.sh +++ regress/cmdline/cherrypick.sh @@ -1773,7 +1773,7 @@ test_cherrypick_logmsg_ref() { for r in $wt_sorted; do echo $sep >> $testroot/stdout.expected - if [ $r == $branch_rev ]; then + if [ $r = $branch_rev ]; then echo "cherrypick $r" >> $testroot/stdout.expected echo "from: $GOT_AUTHOR" >> $testroot/stdout.expected echo "date: $date" >> $testroot/stdout.expected @@ -1883,7 +1883,7 @@ test_cherrypick_logmsg_ref() { echo -n > $testroot/stdout.expected for r in $wt2_sorted; do echo $sep >> $testroot/stdout.expected - if [ $r == $branch2_rev ]; then + if [ $r = $branch2_rev ]; then echo "cherrypick $r" >> $testroot/stdout.expected echo "from: $GOT_AUTHOR" >> $testroot/stdout.expected echo "date: $date" >> $testroot/stdout.expected @@ -1921,7 +1921,7 @@ test_cherrypick_logmsg_ref() { for r in $wt_sorted; do echo -n "cherrypick $r" >> $testroot/wt.list - if [ $r == $branch_rev2 ]; then + if [ $r = $branch_rev2 ]; then echo -n " (newbranch)" >> $testroot/wt.list fi echo >> $testroot/wt.list @@ -1930,14 +1930,14 @@ test_cherrypick_logmsg_ref() { for r in $wt2_sorted; do echo -n "cherrypick $r" >> $testroot/wt2.list - if [ $r == $branch2_rev2 ]; then + if [ $r = $branch2_rev2 ]; then echo -n " (newbranch2)" >> $testroot/wt2.list fi echo >> $testroot/wt2.list echo "work tree: $wt2_uuid" >> $testroot/wt2.list done - if [ $wt_uuid == $wt_first ]; then + if [ $wt_uuid = $wt_first ]; then mv $testroot/wt.list $testroot/stdout.expected cat $testroot/wt2.list >> $testroot/stdout.expected else blob - 5abd887aa45862efaed44d7fe13cdbf897e90883 blob + 53011f6f6351ec5e36a888fac308c8d4f0f0002e --- regress/cmdline/commit.sh +++ regress/cmdline/commit.sh @@ -1871,7 +1871,7 @@ EOF local first=`printf '%s\n%s' $branch_rev $branch_rev2 | sort | head -1` local second=`printf '%s\n%s' $branch_rev $branch_rev2 | sort | tail -1` - if [ $branch_rev == $first ]; then + if [ $branch_rev = $first ]; then local first_msg=$branch_rev_logmsg local second_msg=$branch_rev2_logmsg else