diff options
author | Jeff King <peff@peff.net> | 2015-03-20 06:13:22 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-03-20 11:35:56 -0700 |
commit | 545871bf77da38ec98e66ed35751f42120f1987e (patch) | |
tree | b5bb8afa82d2ae78ee8ff564afadebf912ce0d7b /test-hashmap.c | |
parent | t4117: use modern test_* helpers (diff) | |
download | tgif-545871bf77da38ec98e66ed35751f42120f1987e.tar.xz |
t9001: use test_when_finished
The confirmation tests in t9001 all save the value of
sendemail.confirm, do something to it, then restore it at
the end, in a way that breaks the &&-chain (they are not
wrong, because they save the $? value, but it fools
--chain-lint).
Instead, they can all use test_when_finished, and we can
even make the code simpler by factoring out the shared
lines.
Note that we can _almost_ use test_config here, except that:
1. We do not restore the config with test_unconfig, but by
setting it back to some prior value.
2. We are not always setting a config variable. Sometimes
the change to be undone is unsetting it entirely.
We could teach test_config to handle these cases, but it's
not worth the complexity for a single call-site.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'test-hashmap.c')
0 files changed, 0 insertions, 0 deletions