commit 54b4b049e35d83055a3ad0ee087d447d92f9cbbf from: Stefan Sperling via: Thomas Adam date: Tue Apr 09 11:15:50 2024 UTC fix gotd notification test failures due to missing shell quoting The expected output generated by test scripts was wrong on days with a single-digit date. Found by Omar's regress builder. ok op@ commit - cf85a643cb738e18dccf567b3feb58ad14f861c8 commit + 54b4b049e35d83055a3ad0ee087d447d92f9cbbf blob - c70d0e175ef29d09f384222bdfcfd0951ef644c6 blob + 807c18616e33a8a87ad3db0a355f974f13c8622d --- regress/gotd/email_notification.sh +++ regress/gotd/email_notification.sh @@ -149,7 +149,7 @@ test_many_commits_not_summarized() { for i in `seq 1 24`; do s=`pop_idx $i "$@"` commit_id=$(echo $s | cut -d' ' -f1) - commit_time=$(echo $s | sed -e "s/^$commit_id //g") + commit_time=$(echo "$s" | sed -e "s/^$commit_id //g") printf "commit $commit_id\n" >> $testroot/stdout.expected printf "from: $GOT_AUTHOR\n" >> $testroot/stdout.expected printf "date: $commit_time\n" >> $testroot/stdout.expected @@ -235,7 +235,7 @@ test_many_commits_summarized() { for i in `seq 1 51`; do s=`pop_idx $i "$@"` commit_id=$(echo $s | cut -d' ' -f1) - commit_time=$(echo $s | sed -e "s/^$commit_id //g") + commit_time=$(echo "$s" | sed -e "s/^$commit_id //g") printf "$commit_time $commit_id $GOT_AUTHOR_8 make changes\n" \ >> $testroot/stdout.expected done blob - 2b284098386d43112d889524776e02f46e7e1331 blob + 4e4fcae3bf98da908b2d453065c14d86ec1cd55b --- regress/gotd/http_notification.sh +++ regress/gotd/http_notification.sh @@ -245,7 +245,7 @@ test_many_commits_not_summarized() { for i in `seq 1 24`; do s=`pop_idx $i "$@"` commit_id=$(echo $s | cut -d' ' -f1) - commit_time=$(echo $s | sed -e "s/^$commit_id //g") + commit_time=$(echo "$s" | sed -e "s/^$commit_id //g") echo "$comma" comma=',' @@ -349,7 +349,7 @@ test_many_commits_summarized() { for i in `seq 1 51`; do s=`pop_idx $i "$@"` commit_id=$(echo $s | cut -d' ' -f1) - commit_time=$(echo $s | sed -e "s/^$commit_id //g") + commit_time=$(echo "$s" | sed -e "s/^$commit_id //g") echo "$comma" comma=','