4 ## The builtin ! has the wrong semantics for not.
5 not
() { "$@" && exit 1 ||
:; }
11 darcs setpref
test false
12 darcs record
--no-test -a -m 'add failing test'
14 # should pass with --no-test
17 # should fail when test is run
18 not darcs check
--test
20 # should pass with --no-test in defaults
21 echo check
--no-test > _darcs
/prefs
/defaults
23 not darcs check
--test
25 # should fail with --test in defaults
26 echo check
--test > _darcs
/prefs
/defaults
30 # check global defaults
31 cp ~
/.darcs
/defaults defaults.backup
32 rm _darcs
/prefs
/defaults
34 # --no-test works in global defaults
35 echo check
--no-test > ~
/.darcs
/defaults
37 not darcs check
--test
39 # --test works in global defaults
40 echo check
--test > ~
/.darcs
/defaults
44 # Verify that per-repository defaults override global defaults
46 # --no-test in repository defaults overrides global --test
47 echo check
--test > ~
/.darcs
/defaults
48 echo check
--no-test > _darcs
/prefs
/defaults
50 not darcs check
--test
52 # --test in repository defaults overrides global --no-test
53 echo check
--no-test > ~
/.darcs
/defaults
54 echo check
--test > _darcs
/prefs
/defaults
58 cp defaults.backup ~
/.darcs
/defaults