about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2017-06-02 22:51:58 +0200
committerLeah Neukirchen <leah@vuxu.org>2017-06-02 22:51:58 +0200
commit09420c7d10add24511ee39e66de07c8c136d7b12 (patch)
treee2c97b3b5700d36ec686e58ea40b9bf002442cb1
parentfe6a4a817931f224cb55296171ecd5e3ac220c22 (diff)
downloadxe-09420c7d10add24511ee39e66de07c8c136d7b12.tar.gz
xe-09420c7d10add24511ee39e66de07c8c136d7b12.tar.xz
xe-09420c7d10add24511ee39e66de07c8c136d7b12.zip
tests: ensure we test the xe we built
Found by Nicolas Braud-Santoni.  Fixes #3.
-rwxr-xr-xtests5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests b/tests
index 07b68e1..ab9d615 100755
--- a/tests
+++ b/tests
@@ -4,6 +4,7 @@ printf '1..44\n'
 set -e
 
 : ${XE:=./xe}
+xe() { printf 'Tried to run xe directly, use $XE.\n' 2>&1; exit 111; }
 
 necho() { for a; do printf '%s\n' "$a"; done; }
 
@@ -175,7 +176,7 @@ check_output 'with ITER' '$XE -a -s "echo \$ITER" -- a b c' <<EOF
 3
 EOF
 
-check_output 'is eager' '{ echo 1; sleep 1; echo 11 >/dev/stderr; echo 2; } | xe echo' <<EOF
+check_output 'is eager' '{ echo 1; sleep 1; echo 11 >/dev/stderr; echo 2; } | $XE echo' <<EOF
 1
 11
 2
@@ -243,7 +244,7 @@ EOF
 
 printf '# regressions\n'
 
-check_output '0fb64a4 quoting of empty strings' 'printf "foo\n\n" | ./xe -N2 -v true' <<EOF
+check_output '0fb64a4 quoting of empty strings' 'printf "foo\n\n" | $XE -N2 -v true' <<EOF
 true foo ''
 EOF