t/README: Document test_expect_code
test_expect_code (which was introduced in d3bfdb75) never had any documentation. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ævar Arnfjörð Bjarmason committed
Jul 2, 2010 at 14:59 UTC
97d9fd925bd0db1d11c4fbe8dd919bfb952b2cc1
1 file changed
+7
t/README
+7
@@ -277,6 +277,13 @@ library for your script to use.
277
Like test_expect_success this function can optionally use a three
278
argument invocation with a prerequisite as the first argument.
279
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
+
287
- test_debug <script>
288
289
This takes a single argument, <script>, and evaluates it only