]> Cypherpunks.ru repositories - goredo.git/blobdiff - t/apenwarr/260-whichdo/defaults.do
More apenwarr/redo redo-whichdo behaviour resembling
[goredo.git] / t / apenwarr / 260-whichdo / defaults.do
diff --git a/t/apenwarr/260-whichdo/defaults.do b/t/apenwarr/260-whichdo/defaults.do
new file mode 100644 (file)
index 0000000..0fe3214
--- /dev/null
@@ -0,0 +1,16 @@
+exec >&2
+
+a=$(cd fakesub2 && redo-whichdo d/snork)
+# if sh doesn't abort after the above, then it found a .do file as expected
+
+b=$(cat <<EOF
+d/snork.do
+d/default.do
+default.do
+EOF
+)
+
+if [ "$a" != "$b" ]; then
+    printf 'redo-whichdo mismatch.\n\ngot:\n%s\n\nexpected:\n%s\n' "$a" "$b"
+    exit 11
+fi