commit e4d984c230e887c67692cfcbb7624ab2ccf95e2d from: Stefan Sperling date: Wed May 22 08:02:45 2019 UTC expand test coverage: partial update with parent dir as argument commit - b03c880f032f7cfc88a56c2ede174663d4357344 commit + e4d984c230e887c67692cfcbb7624ab2ccf95e2d blob - afaf069181d0253e696db8ca47abee92de936fd0 blob + da703088394f8fa0cbbb0dfdeeb5ccd9a3bc0370 --- regress/cmdline/update.sh +++ regress/cmdline/update.sh @@ -1086,7 +1086,7 @@ function test_update_partial { echo "modified epsilon/zeta" > $testroot/repo/epsilon/zeta git_commit $testroot/repo -m "modified two files" - for f in alpha beta epsilon/zeta; do + for f in alpha beta; do echo "U $f" > $testroot/stdout.expected echo -n "Updated to commit " >> $testroot/stdout.expected git_show_head $testroot/repo >> $testroot/stdout.expected @@ -1113,6 +1113,33 @@ function test_update_partial { return 1 fi done + + echo "U epsilon/zeta" > $testroot/stdout.expected + echo -n "Updated to commit " >> $testroot/stdout.expected + git_show_head $testroot/repo >> $testroot/stdout.expected + echo >> $testroot/stdout.expected + + (cd $testroot/wt && got update epsilon > $testroot/stdout) + + cmp -s $testroot/stdout.expected $testroot/stdout + ret="$?" + if [ "$ret" != "0" ]; then + diff -u $testroot/stdout.expected $testroot/stdout + test_done "$testroot" "$ret" + return 1 + fi + + echo "modified epsilon/zeta" > $testroot/content.expected + cat $testroot/wt/epsilon/zeta > $testroot/content + + cmp -s $testroot/content.expected $testroot/content + ret="$?" + if [ "$ret" != "0" ]; then + diff -u $testroot/content.expected $testroot/content + test_done "$testroot" "$ret" + return 1 + fi + test_done "$testroot" "$ret" }