Follow upstream changes -- rest
[git-darcs-import.git] / tests / setpref.sh
blob120e78ad5f502aa0feafba4d83c6aeb824b80c24
1 #!/usr/bin/env bash
3 set -ev
5 ## I would use the builtin !, but that has the wrong semantics.
6 not () { "$@" && exit 1 || :; }
8 rm -rf temp1 temp2
9 mkdir temp1
10 cd temp1
11 darcs init
12 echo 'test file 1' > foo
13 darcs record --look-for-adds --all -m"Patch 1"
14 echo 'test boringfile' > bar
15 darcs setpref boringfile bar
16 darcs record --look-for-adds --all -m"Patch 2"
17 echo 'test file 3' > baz
18 # there should be no -R
19 darcs record --look-for-adds --all -m"Patch 3" > ../temp2
20 cat ../temp2
21 not grep R ../temp2
23 cd ..
25 rm -rf temp1
26 rm -f temp2