Commit c480921
committed
t9902: make test "set -e" clean
In order to catch mistakes like misspelling "test_expect_success",
we would like to eventually be able to run our test suite with the
"-e" option on.
This script uses the "read" utility to populate a single variable
with the contents of a here-document. As "read" signals that it saw
the EOF by exiting with status 1, this triggers "set -e".
Here, we squelch it with the standard "|| :" trick. A simpler
alternative may be to use a simpler assignment, e.g.,
refs='main
maint
next
seen'
Either way would work, but just honor the original author's
preference.
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 9f65947 commit c480921
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
590 | 590 | | |
591 | 591 | | |
592 | 592 | | |
593 | | - | |
| 593 | + | |
594 | 594 | | |
595 | 595 | | |
596 | 596 | | |
| |||
0 commit comments