commit 58e5e037d6e3e5d94bdf674e074fcdf411e80bfc from: Stefan Sperling date: Tue Jun 20 08:49:19 2023 UTC extend test_add_multiple to cover got add -R * behaviour commit - 9628f36dac5ed5319b482a020f06ff9737a0c1f0 commit + 58e5e037d6e3e5d94bdf674e074fcdf411e80bfc blob - 41fa5ae45bcc23ddd3f6c20844b2b898a7901bbf blob + 5cec87c8d26920d2df174053c6479b3b60232857 --- regress/cmdline/add.sh +++ regress/cmdline/add.sh @@ -93,12 +93,32 @@ test_add_multiple() { echo "A bar" > $testroot/stdout.expected echo "A baz" >> $testroot/stdout.expected echo "A foo" >> $testroot/stdout.expected + + cmp -s $testroot/stdout.expected $testroot/stdout + ret=$? + if [ $ret -ne 0 ]; then + diff -u $testroot/stdout.expected $testroot/stdout + test_done "$testroot" "$ret" + return 1 + fi + + echo "new file" > $testroot/wt/bax + (cd $testroot/wt && got add -R * > $testroot/stdout) + ret=$? + if [ $ret -ne 0 ]; then + echo "got add failed unexpectedly" >&2 + test_done "$testroot" 1 + return 1 + fi + + echo "A bax" > $testroot/stdout.expected cmp -s $testroot/stdout.expected $testroot/stdout ret=$? if [ $ret -ne 0 ]; then diff -u $testroot/stdout.expected $testroot/stdout fi + test_done "$testroot" "$ret" }