Skip to content

Commit 335f878

Browse files
avargitster
authored andcommitted
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>
1 parent fadb515 commit 335f878

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

t/t1020-subdirectory.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,18 @@ test_expect_success 'update-index and ls-files' '
2424
cd "$HERE" &&
2525
git update-index --add one &&
2626
case "`git ls-files`" in
27-
one) echo ok one ;;
27+
one) echo pass one ;;
2828
*) echo bad one; exit 1 ;;
2929
esac &&
3030
cd dir &&
3131
git update-index --add two &&
3232
case "`git ls-files`" in
33-
two) echo ok two ;;
33+
two) echo pass two ;;
3434
*) echo bad two; exit 1 ;;
3535
esac &&
3636
cd .. &&
3737
case "`git ls-files`" in
38-
dir/two"$LF"one) echo ok both ;;
38+
dir/two"$LF"one) echo pass both ;;
3939
*) echo bad; exit 1 ;;
4040
esac
4141
'
@@ -58,17 +58,17 @@ test_expect_success 'diff-files' '
5858
echo a >>one &&
5959
echo d >>dir/two &&
6060
case "`git diff-files --name-only`" in
61-
dir/two"$LF"one) echo ok top ;;
61+
dir/two"$LF"one) echo pass top ;;
6262
*) echo bad top; exit 1 ;;
6363
esac &&
6464
# diff should not omit leading paths
6565
cd dir &&
6666
case "`git diff-files --name-only`" in
67-
dir/two"$LF"one) echo ok subdir ;;
67+
dir/two"$LF"one) echo pass subdir ;;
6868
*) echo bad subdir; exit 1 ;;
6969
esac &&
7070
case "`git diff-files --name-only .`" in
71-
dir/two) echo ok subdir limited ;;
71+
dir/two) echo pass subdir limited ;;
7272
*) echo bad subdir limited; exit 1 ;;
7373
esac
7474
'

t/t2102-update-index-symlinks.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ git update-index symlink'
2424
test_expect_success \
2525
'the index entry must still be a symbolic link' '
2626
case "`git ls-files --stage --cached symlink`" in
27-
120000" "*symlink) echo ok;;
27+
120000" "*symlink) echo pass;;
2828
*) echo fail; git ls-files --stage --cached symlink; (exit 1);;
2929
esac'
3030

t/t3700-add.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ test_expect_success \
2626
chmod 755 xfoo1 &&
2727
git add xfoo1 &&
2828
case "`git ls-files --stage xfoo1`" in
29-
100644" "*xfoo1) echo ok;;
29+
100644" "*xfoo1) echo pass;;
3030
*) echo fail; git ls-files --stage xfoo1; (exit 1);;
3131
esac'
3232

@@ -35,7 +35,7 @@ test_expect_success SYMLINKS 'git add: filemode=0 should not get confused by sym
3535
ln -s foo xfoo1 &&
3636
git add xfoo1 &&
3737
case "`git ls-files --stage xfoo1`" in
38-
120000" "*xfoo1) echo ok;;
38+
120000" "*xfoo1) echo pass;;
3939
*) echo fail; git ls-files --stage xfoo1; (exit 1);;
4040
esac
4141
'
@@ -47,7 +47,7 @@ test_expect_success \
4747
chmod 755 xfoo2 &&
4848
git update-index --add xfoo2 &&
4949
case "`git ls-files --stage xfoo2`" in
50-
100644" "*xfoo2) echo ok;;
50+
100644" "*xfoo2) echo pass;;
5151
*) echo fail; git ls-files --stage xfoo2; (exit 1);;
5252
esac'
5353

@@ -56,7 +56,7 @@ test_expect_success SYMLINKS 'git add: filemode=0 should not get confused by sym
5656
ln -s foo xfoo2 &&
5757
git update-index --add xfoo2 &&
5858
case "`git ls-files --stage xfoo2`" in
59-
120000" "*xfoo2) echo ok;;
59+
120000" "*xfoo2) echo pass;;
6060
*) echo fail; git ls-files --stage xfoo2; (exit 1);;
6161
esac
6262
'
@@ -67,7 +67,7 @@ test_expect_success SYMLINKS \
6767
ln -s xfoo2 xfoo3 &&
6868
git update-index --add xfoo3 &&
6969
case "`git ls-files --stage xfoo3`" in
70-
120000" "*xfoo3) echo ok;;
70+
120000" "*xfoo3) echo pass;;
7171
*) echo fail; git ls-files --stage xfoo3; (exit 1);;
7272
esac'
7373

@@ -172,7 +172,7 @@ test_expect_success 'git add --refresh' '
172172
test -z "`git diff-index HEAD -- foo`" &&
173173
git read-tree HEAD &&
174174
case "`git diff-index HEAD -- foo`" in
175-
:100644" "*"M foo") echo ok;;
175+
:100644" "*"M foo") echo pass;;
176176
*) echo fail; (exit 1);;
177177
esac &&
178178
git add --refresh -- foo &&

0 commit comments

Comments
 (0)