Commit 302c2d6
committed
t940?: 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.
The cverserver tests have the usual pattern, where it
cmd ...
if test $? ...
expects cmd to be allowed to fail freely and we can act on its exit
status, which is not possible under "set -e". Rewrite it using the
common pattern:
status=0; cmd ... || status=$?
if test $status ...
which means the same thing but does not fail under "set -e".
Note that I do not run cvs tests myself, so while this change
makes the scripts pass to the point where they correctly sets
skip_all='message' and triggers test_done, it is very likely
that there needs further work to make the rest of the scripts
"set -e" clean.
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 74060d4 commit 302c2d6
3 files changed
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
| 20 | + | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
| 63 | + | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
72 | | - | |
| 71 | + | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
0 commit comments