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.
t/op/fh.t See if filehandles work
t/op/filehandle.t Tests for http://rt.perl.org/rt3/Ticket/Display.html?id=72586
t/op/filetest.t See if file tests work
+t/op/filetest_stack_ok.t See if file tests leave their argument on the stack
t/op/filetest_t.t See if -t file test works
t/op/flip.t See if range operator works
t/op/fork.t See if fork works
/* I believe that all these three are likely to be defined on most every
system these days. */
#ifndef S_ISUID
- if(PL_op->op_type == OP_FTSUID)
+ if(PL_op->op_type == OP_FTSUID) {
+ (void) POPs;
RETPUSHNO;
+ }
#endif
#ifndef S_ISGID
- if(PL_op->op_type == OP_FTSGID)
+ if(PL_op->op_type == OP_FTSGID) {
+ (void) POPs;
RETPUSHNO;
+ }
#endif
#ifndef S_ISVTX
- if(PL_op->op_type == OP_FTSVTX)
+ if(PL_op->op_type == OP_FTSVTX) {
+ (void) POPs;
RETPUSHNO;
+ }
#endif
STACKED_FTEST_CHECK;
--- /dev/null
+#!./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" );
+}