summaryrefslogtreecommitdiff
path: root/t/run
diff options
context:
space:
mode:
authorMichael G. Schwern <schwern@pobox.com>2001-11-29 17:05:11 -0500
committerJarkko Hietaniemi <jhi@iki.fi>2001-11-30 13:59:18 +0000
commit1b24ed4b35a915c6e59d3fc62a8dd13d3947354a (patch)
tree1d8982db331400bb713770eca6dc989a6e471779 /t/run
parent2a204b451f774baa0cfb5a7a330513820530f0bf (diff)
downloadperl-1b24ed4b35a915c6e59d3fc62a8dd13d3947354a.tar.gz
-P on VMS. Evicting sed
Message-ID: <20011129220510.A18869@blackrider> TODO 1: if cppstdin is used and not yet installed, the Px.t will fail (must do the same as in cpp.t) TODO 2: does this work if no Perl whatsoever has yet been installed? That is, we should be using the Perl we are building to execute the one-liner. p4raw-id: //depot/perl@13383
Diffstat (limited to 't/run')
-rw-r--r--t/run/switchPx.aux34
-rw-r--r--t/run/switchPx.t14
2 files changed, 48 insertions, 0 deletions
diff --git a/t/run/switchPx.aux b/t/run/switchPx.aux
new file mode 100644
index 0000000000..68ebc83f79
--- /dev/null
+++ b/t/run/switchPx.aux
@@ -0,0 +1,34 @@
+Some stuff that's not Perl
+
+This CPP directive should not be read.
+#define BARMAR 1
+
+#perl
+
+Still not perl.
+
+#!
+
+still not perl
+
+#!/something/else
+
+still not perl
+
+#!/some/path/that/leads/to/perl -l
+
+# The -l switch should be applied from the #! line.
+# Unfortunately, -P has a bug whereby the #! line is ignored.
+# If this test suddenly starts printing blank lines that bug is fixed.
+
+#define FOO "ok 1\n"
+
+#ifdef BARMAR
+# define YAR "not ok 2\n"
+#else
+# define YAR "ok 2\n"
+#endif
+
+print "1..2\n";
+print FOO;
+print YAR;
diff --git a/t/run/switchPx.t b/t/run/switchPx.t
new file mode 100644
index 0000000000..0f029a7f13
--- /dev/null
+++ b/t/run/switchPx.t
@@ -0,0 +1,14 @@
+#!./perl
+
+# Ensure that the -P and -x flags work together.
+
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
+
+require './test.pl';
+
+print runperl( switches => ['-Px'],
+ nolib => 1, # for some reason this is necessary under VMS
+ progfile => 'run/switchPx.aux' );