4 # Some tests for launching external commands
6 # I would use the builtin !, but that has the wrong semantics.
7 not
() { "$@" && exit 1 ||
:; }
11 touch_fakessh
='./touch-fakessh'
12 if echo $OS |
grep -i windows
; then
13 touch_fakessh
="touch_fakessh.bat"
15 export DARCS_SSH
=$touch_fakessh
16 export DARCS_SCP
=$touch_fakessh
17 export DARCS_SFTP
=$touch_fakessh
19 rm -rf 'touch-fakessh'
21 # make our ssh command one word only
22 echo 'echo hello > fakessh' > $touch_fakessh
23 chmod u
+x
$touch_fakessh
24 # first test the DARCS_SSH environment variable
25 not darcs get example.com
:foo
29 # now make sure that we don't launch ssh for nothing
36 not darcs get http
://example.com
:foo