tests: Say "pass" rather than "ok" on empty lines for TAP
Lines that begin with "ok" confuse the TAP harness because it can't distinguish them from a test counter. Work around the issue by saying "pass" instead, which isn't a reserved TAP word. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ævar Arnfjörð Bjarmason committed
Jun 24, 2010 at 17:44 UTC
335f87871fe5aa6b3fd55b2b4e80f16fe9681483
3 files changed
+13
-13
t/t1020-subdirectory.sh
+6
-6
@@ -24,18 +24,18 @@ test_expect_success 'update-index and ls-files' '
24
cd "$HERE" &&
25
git update-index --add one &&
26
case "`git ls-files`" in
27
- one) echo ok one ;;
27
+ one) echo pass one ;;
28
*) echo bad one; exit 1 ;;
29
esac &&
30
cd dir &&
31
git update-index --add two &&
32
case "`git ls-files`" in
33
- two) echo ok two ;;
33
+ two) echo pass two ;;
34
*) echo bad two; exit 1 ;;
35
esac &&
36
cd .. &&
37
case "`git ls-files`" in
38
- dir/two"$LF"one) echo ok both ;;
38
+ dir/two"$LF"one) echo pass both ;;
39
*) echo bad; exit 1 ;;
40
esac
41
'
@@ -58,17 +58,17 @@ test_expect_success 'diff-files' '
58
echo a >>one &&
59
echo d >>dir/two &&
60
case "`git diff-files --name-only`" in
61
- dir/two"$LF"one) echo ok top ;;
61
+ dir/two"$LF"one) echo pass top ;;
62
*) echo bad top; exit 1 ;;
63
esac &&
64
# diff should not omit leading paths
65
cd dir &&
66
case "`git diff-files --name-only`" in
67
- dir/two"$LF"one) echo ok subdir ;;
67
+ dir/two"$LF"one) echo pass subdir ;;
68
*) echo bad subdir; exit 1 ;;
69
esac &&
70
case "`git diff-files --name-only .`" in
71
- dir/two) echo ok subdir limited ;;
71
+ dir/two) echo pass subdir limited ;;
72
*) echo bad subdir limited; exit 1 ;;
73
esac
74
'
t/t2102-update-index-symlinks.sh
+1
-1
@@ -24,7 +24,7 @@ git update-index symlink'
24
test_expect_success \
25
'the index entry must still be a symbolic link' '
26
case "`git ls-files --stage --cached symlink`" in
27
-120000" "*symlink) echo ok;;
27
+120000" "*symlink) echo pass;;
28
*) echo fail; git ls-files --stage --cached symlink; (exit 1);;
29
esac'
30
t/t3700-add.sh
+6
-6
@@ -26,7 +26,7 @@ test_expect_success \
26
chmod 755 xfoo1 &&
27
git add xfoo1 &&
28
case "`git ls-files --stage xfoo1`" in
29
- 100644" "*xfoo1) echo ok;;
29
+ 100644" "*xfoo1) echo pass;;
30
*) echo fail; git ls-files --stage xfoo1; (exit 1);;
31
esac'
32
@@ -35,7 +35,7 @@ test_expect_success SYMLINKS 'git add: filemode=0 should not get confused by sym
35
ln -s foo xfoo1 &&
36
git add xfoo1 &&
37
case "`git ls-files --stage xfoo1`" in
38
- 120000" "*xfoo1) echo ok;;
38
+ 120000" "*xfoo1) echo pass;;
39
*) echo fail; git ls-files --stage xfoo1; (exit 1);;
40
esac
41
'
@@ -47,7 +47,7 @@ test_expect_success \
47
chmod 755 xfoo2 &&
48
git update-index --add xfoo2 &&
49
case "`git ls-files --stage xfoo2`" in
50
- 100644" "*xfoo2) echo ok;;
50
+ 100644" "*xfoo2) echo pass;;
51
*) echo fail; git ls-files --stage xfoo2; (exit 1);;
52
esac'
53
@@ -56,7 +56,7 @@ test_expect_success SYMLINKS 'git add: filemode=0 should not get confused by sym
56
ln -s foo xfoo2 &&
57
git update-index --add xfoo2 &&
58
case "`git ls-files --stage xfoo2`" in
59
- 120000" "*xfoo2) echo ok;;
59
+ 120000" "*xfoo2) echo pass;;
60
*) echo fail; git ls-files --stage xfoo2; (exit 1);;
61
esac
62
'
@@ -67,7 +67,7 @@ test_expect_success SYMLINKS \
67
ln -s xfoo2 xfoo3 &&
68
git update-index --add xfoo3 &&
69
case "`git ls-files --stage xfoo3`" in
70
- 120000" "*xfoo3) echo ok;;
70
+ 120000" "*xfoo3) echo pass;;
71
*) echo fail; git ls-files --stage xfoo3; (exit 1);;
72
esac'
73
@@ -172,7 +172,7 @@ test_expect_success 'git add --refresh' '
172
test -z "`git diff-index HEAD -- foo`" &&
173
git read-tree HEAD &&
174
case "`git diff-index HEAD -- foo`" in
175
- :100644" "*"M foo") echo ok;;
175
+ :100644" "*"M foo") echo pass;;
176
*) echo fail; (exit 1);;
177
esac &&
178
git add --refresh -- foo &&