summaryrefslogtreecommitdiff
path: root/tests/misc
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-03-03 10:39:02 +0000
committerJim Meyering <jim@meyering.net>2003-03-03 10:39:02 +0000
commita6b030577ba3a7c9e809204b14d7f5b1fb2a0f6f (patch)
treea565895644419c5486cba7b782a9a09911657e25 /tests/misc
parent7b5ef3e75d6d596a238dedf796e58e0a0cf4594c (diff)
downloadcoreutils-a6b030577ba3a7c9e809204b14d7f5b1fb2a0f6f.tar.xz
Set $ME properly.
Diffstat (limited to 'tests/misc')
-rwxr-xr-xtests/misc/tty-eof5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/misc/tty-eof b/tests/misc/tty-eof
index 75a86be06..a17b4abf5 100755
--- a/tests/misc/tty-eof
+++ b/tests/misc/tty-eof
@@ -10,6 +10,9 @@ s test"
;;
esac
+ARGV_0=$0
+export ARGV_0
+
exec $PERL -w -- - <<\EOF
# Ensure that cat exits upon a single EOF (^D) from a tty.
@@ -17,7 +20,7 @@ exec $PERL -w -- - <<\EOF
# requiring no arguments and that write to standard output.
use strict;
-(my $ME = $0) =~ s|.*/||;
+(my $ME = $ENV{ARGV_0}) =~ s|.*/||;
eval { require Expect };
$@ and (warn "$ME: this script requires Perl's Expect package\n"), exit 77;