diff --git a/t/nothing.od b/t/nothing.od new file mode 100644 index 0000000..6661249 --- /dev/null +++ b/t/nothing.od @@ -0,0 +1,2 @@ +# this shell script contains no commands. +# it's used for testing the return value of '. ./nothing.od' in shelltest.od. diff --git a/t/shelltest.od b/t/shelltest.od index 9e3ded3..c97fa62 100644 --- a/t/shelltest.od +++ b/t/shelltest.od @@ -280,5 +280,13 @@ lt [ "$x" = "1" ] || fail 112 [ "$y$z" = "67" ] || fail 113 +# reported by Tim Allen: +# some shells don't return 0 from an empty '.' script; they return the +# previous command's exit code instead. +# See: +# http://pubs.opengroup.org/onlinepubs/009695399/utilities/dot.html +# http://austingroupbugs.net/view.php?id=114 +false +. ./nothing.od || warn 114 exit $FAIL