Skip to content

Commit 97d9fd9

Browse files
avargitster
authored andcommitted
t/README: Document test_expect_code
test_expect_code (which was introduced in d3bfdb7) never had any documentation. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 2fac6a4 commit 97d9fd9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

t/README

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,13 @@ library for your script to use.
277277
Like test_expect_success this function can optionally use a three
278278
argument invocation with a prerequisite as the first argument.
279279

280+
- test_expect_code [<prereq>] <code> <message> <script>
281+
282+
Analogous to test_expect_success, but pass the test if it exits
283+
with a given exit <code>
284+
285+
test_expect_code 1 'Merge with d/f conflicts' 'git merge "merge msg" B master'
286+
280287
- test_debug <script>
281288

282289
This takes a single argument, <script>, and evaluates it only

0 commit comments

Comments
 (0)