remove some unnecessary verification from update tests
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 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
diff --git a/regress/cmdline/update.sh b/regress/cmdline/update.sh
index 7364849..5c505f1 100755
--- a/regress/cmdline/update.sh
+++ b/regress/cmdline/update.sh
@@ -43,11 +43,7 @@ function test_update_basic {
fi
echo "modified alpha" > $testroot/content.expected
- echo "beta" >> $testroot/content.expected
- echo "zeta" >> $testroot/content.expected
- echo "delta" >> $testroot/content.expected
- cat $testroot/wt/alpha $testroot/wt/beta $testroot/wt/epsilon/zeta \
- $testroot/wt/gamma/delta > $testroot/content
+ cat $testroot/wt/alpha > $testroot/content
cmp $testroot/content.expected $testroot/content
ret="$?"
@@ -84,13 +80,8 @@ function test_update_adds_file {
return 1
fi
- echo "alpha" >> $testroot/content.expected
- echo "beta" >> $testroot/content.expected
- echo "zeta" >> $testroot/content.expected
- echo "delta" >> $testroot/content.expected
echo "new" >> $testroot/content.expected
- cat $testroot/wt/alpha $testroot/wt/beta $testroot/wt/epsilon/zeta \
- $testroot/wt/gamma/delta $testroot/wt/gamma/new > $testroot/content
+ cat $testroot/wt/gamma/new > $testroot/content
cmp $testroot/content.expected $testroot/content
ret="$?"
@@ -128,21 +119,11 @@ function test_update_deletes_file {
if [ -e $testroot/wt/beta ]; then
echo "removed file beta still exists on disk" >&2
+ test_done "$testroot" "1"
return 1
fi
- echo "alpha" >> $testroot/content.expected
- echo "zeta" >> $testroot/content.expected
- echo "delta" >> $testroot/content.expected
- cat $testroot/wt/alpha $testroot/wt/epsilon/zeta \
- $testroot/wt/gamma/delta > $testroot/content
-
- cmp $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
- diff -u $testroot/content.expected $testroot/content
- fi
- test_done "$testroot" "$ret"
+ test_done "$testroot" "0"
}
function test_update_deletes_dir {
@@ -173,21 +154,11 @@ function test_update_deletes_dir {
if [ -e $testroot/wt/epsilon ]; then
echo "removed dir epsilon still exists on disk" >&2
+ test_done "$testroot" "1"
return 1
fi
- echo "alpha" >> $testroot/content.expected
- echo "beta" >> $testroot/content.expected
- echo "delta" >> $testroot/content.expected
- cat $testroot/wt/alpha $testroot/wt/beta \
- $testroot/wt/gamma/delta > $testroot/content
-
- cmp $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
- diff -u $testroot/content.expected $testroot/content
- fi
- test_done "$testroot" "$ret"
+ test_done "$testroot" "0"
}
function test_update_deletes_dir_with_path_prefix {
@@ -225,15 +196,7 @@ function test_update_deletes_dir_with_path_prefix {
return 1
fi
- echo "zeta" >> $testroot/content.expected
- cat $testroot/wt/zeta > $testroot/content
-
- cmp $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
- diff -u $testroot/content.expected $testroot/content
- fi
- test_done "$testroot" "$ret"
+ test_done "$testroot" "0"
}
run_test test_update_basic