expand test coverage: partial update with parent dir as argument
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
diff --git a/regress/cmdline/update.sh b/regress/cmdline/update.sh
index afaf069..da70308 100755
--- a/regress/cmdline/update.sh
+++ b/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"
}