commit 166674b8808a9a16a3cff59d166410cd37833014 from: Stefan Sperling date: Tue Apr 09 09:01:49 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 - 2fed5287a0b2737115e6d0dcad77a6b371206cb1 commit + 166674b8808a9a16a3cff59d166410cd37833014 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=','