commit 8d6e02ca3fa611d074d94e362086f8dff48b8f3d from: Thomas Adam date: Fri Mar 03 22:37:57 2023 UTC regress: make cmdline tests sh compatible Ensure shell scripts can run under more POSIX-restricted shells. OK op@ commit - 0ef5847bc496e50dff57096c3f8eef4336901071 commit + 8d6e02ca3fa611d074d94e362086f8dff48b8f3d 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 - 74cf5cf5b28feb35d4b3b9bde9ff356cc0f2586c blob + 124831d9fa1220a2799140cb081d095a318e4b5e --- regress/cmdline/commit.sh +++ regress/cmdline/commit.sh @@ -1879,7 +1879,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