4 # Some tests for proper handling of filepaths
6 not
() { "$@" && exit 1 ||
:; }
9 if uname |
grep -i cygwin
> /dev
/null
; then
15 # ugly hack for Cygwin and portable_pwd
21 # Make sure that init works with --repodir
22 darcs init
--repodir=temp1
25 # add some meat to that repository
29 darcs record
-m moo
-a
32 # ----------------------------------------------------------------------
33 # local vs remote filepaths
34 # ----------------------------------------------------------------------
36 # trick: OS-detection (if needed)
37 if echo $OS |
grep -i windows
; then
38 echo This
test does not work on Windows
46 darcs add
--reserved-ok foo
:bar
51 # ----------------------------------------------------------------------
53 # ----------------------------------------------------------------------
54 mkdir
-p temp
1/non-darcs
55 # FIXME: This test does not seem to make much sense
56 # --repodir is not recursive
57 not darcs get temp
1/non-darcs
2> log
58 grep "Not a repository" log
59 rm -rf temp
1/non-darcs
62 # get accepts --repodir.
63 darcs get
--repodir=temp2 temp1 |
grep -i "Finished getting"
66 # get accepts absolute --repodir.
67 darcs get
--repodir="${DIR}/temp2" temp1 |
grep -i "Finished getting"
70 # changes accepts --repodir.
71 darcs changes
--repodir=temp1 |
grep -i "moo"
72 # changes accepts absolute --repo.
73 darcs changes
--repo="${DIR}/temp1" |
grep -i "moo"
74 # changes accepts relative --repo.
75 darcs changes
--repo=temp1 |
grep -i "moo"
76 # [issue467] context --repodir
77 darcs changes
--context --repodir=temp1 |
grep 'Context:'
79 # dist accepts --repodir.
80 darcs dist
--repodir=temp1 |
grep -i "Created dist"
82 # optimize accepts --repodir.
83 darcs optimize
--reorder-patches --repodir=temp1 |
grep -i "done optimizing"
85 # repair accepts --repodir.
86 darcs repair
--repodir=temp1 |
grep -i "already consistent"
88 # replace accepts --repodir.
89 darcs replace
--repodir=temp1 foo bar
91 # setpref accepts --repodir.
92 darcs setpref
--repodir=temp1
test echo |
grep -i "Changing value of test"
94 # trackdown accepts --repodir.
95 darcs trackdown
--repodir=temp1 |
grep -i "Success!"
97 # ----------------------------------------------------------------------
98 # converting between absolute and relative paths
99 # ----------------------------------------------------------------------
101 darcs get temp1 temp3
108 darcs record
-m hello1
-a
110 darcs record
-m hello2
-a
115 darcs pull ..
/temp2
-p1 --all |
grep -i 'Finished pulling'
116 darcs pull
--dry-run |
grep hello2
118 #[issue268] repodir with subdir
119 darcs pull
--dry-run |
grep hello2
123 rm -rf log temp1 temp2 temp3