4 # Some tests for 'darcs rec --edit-long-comment'
6 not
() { "$@" && exit 1 ||
:; }
8 # trick: OS-detection (if needed)
9 if echo $OS |
grep -i windows
; then
10 echo This
test does not work on Windows
16 export DARCS_EDITOR
="/bin/cat -n"
17 # editor: space in command
23 darcs record
--edit-long-comment -a -m foo
file.t |
grep '2.*END OF DESCRIPTION'
27 # editor: space in path
33 darcs record
--edit-long-comment -a -m foo
file.t |
grep '2.*END OF DESCRIPTION'
37 export DARCS_EDITOR
='grep "END OF"'
38 # editor: quoting in command
44 darcs record
--edit-long-comment -a -m foo
file.t |
grep 'END OF'
48 export DARCS_EDITOR
='/bin/echo'
49 # editor: evil filename
55 touch '; test-command'
56 echo > test-command
<< FOO
60 chmod u
+x test-command
61 darcs record
--logfile='; test-command' --edit-long-comment -a -m foo
file.t
> log