summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorAndy Armstrong <andy@hexten.net>2010-08-15 12:05:23 +0100
committerGeorge Greer <perl@greerga.m-l.org>2010-08-17 18:36:31 -0400
commitc410dd6ad7a0e7169d54bd81c10eae997ada5d38 (patch)
treebbc1248b42740261aae1933117cd40cfb339562d /t
parent4feb80ac47a22e7de7d7c1c1d5dfb3d744a2a3a7 (diff)
downloadperl-c410dd6ad7a0e7169d54bd81c10eae997ada5d38.tar.gz
Make sure the stack is balanced in the case that we fake the result of unsupported filetests.
This time with an appropriate comment on the test. And with that I'll attempt to stop spamming P5P, at least for today, and go and do something less risky. Running with scissors perhaps.
Diffstat (limited to 't')
-rw-r--r--t/op/filetest_stack_ok.t19
1 files changed, 19 insertions, 0 deletions
diff --git a/t/op/filetest_stack_ok.t b/t/op/filetest_stack_ok.t
new file mode 100644
index 0000000000..91e31e0a27
--- /dev/null
+++ b/t/op/filetest_stack_ok.t
@@ -0,0 +1,19 @@
+#!./perl
+
+# On platforms that don't support all of the filetest operators the code
+# that faked the results of missing tests used to leave the test's
+# argument on the stack.
+
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ require './test.pl';
+}
+
+my @ops = split //, 'rwxoRWXOezsfdlpSbctugkTMBAC';
+
+plan( tests => @ops * 1 );
+
+for my $op (@ops) {
+ ok( 1 == @{ [ eval "-$op 'TEST'" ] }, "-$op returns single value" );
+}