commit 5763426aa30e7fbf05748c70f44f7b435fcb511d from: Omar Polo date: Sat Jan 07 13:30:43 2023 UTC regress: replace echo \n with printf and heredoc echo \n is not really portable. Not that it matters since the regress suite is already using non-POSIX features (like `local'). However, it's the only place using it and easy to fix. ok jamsek commit - 8f4e3da96c5f4996c58dc6276417edf32c9589aa commit + 5763426aa30e7fbf05748c70f44f7b435fcb511d blob - 36c40d891f80c07c830e944e477fd259958d981e blob + 8b3e1a4e57ad816297349a8e063b4b8e1c28f9cf --- regress/cmdline/log.sh +++ regress/cmdline/log.sh @@ -859,7 +859,7 @@ test_log_diffstat() { return 1 fi - echo "modified\nalpha." > $testroot/wt/alpha + printf "modified\nalpha.\n" > $testroot/wt/alpha (cd $testroot/wt && got commit -m 'log_diffstat mod file' > /dev/null) (cd $testroot/wt && got rm beta >/dev/null) @@ -873,23 +873,25 @@ test_log_diffstat() { (cd $testroot/wt && got log -d | grep -A2 '^ [MDmA]' | sed '/^--/d' > \ $testroot/stdout) - echo " A new | 1+ 0-" > $testroot/stdout.expected - echo "\n1 file changed, 1 insertions(+), 0 deletions(-)" >> \ - $testroot/stdout.expected - echo " D beta | 0+ 1-" >> $testroot/stdout.expected - echo " m epsilon/zeta | 0+ 0-" >> $testroot/stdout.expected - echo "\n2 files changed, 0 insertions(+), 1 deletions(-)" >> \ - $testroot/stdout.expected - echo " M alpha | 2+ 1-" >> $testroot/stdout.expected - echo "\n1 file changed, 2 insertions(+), 1 deletions(-)" >> \ - $testroot/stdout.expected - echo " A alpha | 1+ 0-" >> $testroot/stdout.expected - echo " A beta | 1+ 0-" >> $testroot/stdout.expected - echo " A epsilon/zeta | 1+ 0-" >> $testroot/stdout.expected - echo " A gamma/delta | 1+ 0-" >> $testroot/stdout.expected - echo "\n4 files changed, 4 insertions(+), 0 deletions(-)" >> \ - $testroot/stdout.expected + cat <$testroot/stdout.expected + A new | 1+ 0- +1 file changed, 1 insertions(+), 0 deletions(-) + D beta | 0+ 1- + m epsilon/zeta | 0+ 0- + +2 files changed, 0 insertions(+), 1 deletions(-) + M alpha | 2+ 1- + +1 file changed, 2 insertions(+), 1 deletions(-) + A alpha | 1+ 0- + A beta | 1+ 0- + A epsilon/zeta | 1+ 0- + A gamma/delta | 1+ 0- + +4 files changed, 4 insertions(+), 0 deletions(-) +EOF + cmp -s $testroot/stdout.expected $testroot/stdout ret=$? if [ $ret -ne 0 ]; then