]> Cypherpunks.ru repositories - goredo.git/blob - t/apenwarr/260-whichdo/exists.do
More apenwarr/redo redo-whichdo behaviour resembling
[goredo.git] / t / apenwarr / 260-whichdo / exists.do
1 exec >&2
2
3 a=$(cd fakesub && redo-whichdo ../a/b/x.y.z)
4 # if sh doesn't abort after the above, then it found a .do file as expected
5
6 # Note: we expect redo-whichdo to return paths relative to $PWD at the time
7 # it's run, which in this case is fakesub.
8 # Likely bugs would be to return paths relative to the start dir, the .redo
9 # dir, the current target dir, the requested target dir, etc.
10 b=$(cat <<EOF
11 ../a/b/x.y.z.do
12 ../a/b/default.y.z.do
13 ../a/b/default.z.do
14 ../a/b/default.do
15 ../a/default.y.z.do
16 ../a/default.z.do
17 ../a/default.do
18 ../default.y.z.do
19 EOF
20 )
21
22 if [ "$a" != "$b" ]; then
23     printf 'redo-whichdo mismatch.\n\ngot:\n%s\n\nexpected:\n%s\n' "$a" "$b"
24     exit 11
25 fi