Handle PERLIO= and document a bit.
[p5sagit/p5-mst-13.2.git] / t / op / undef.t
index 3bfe1a3..1d16994 100755 (executable)
@@ -1,6 +1,11 @@
 #!./perl
 
-print "1..27\n";
+BEGIN {
+    chdir 't' if -d 't';
+    @INC = '../lib';
+}
+
+print "1..28\n";
 
 print defined($a) ? "not ok 1\n" : "ok 1\n";
 
@@ -74,3 +79,9 @@ print $@ =~ /^Modification of a read/ ? "ok 23\n" : "not ok 23\n";
     @foo = ( a => 1 );
     print defined @foo ? "ok 27\n" : "not ok 27\n";
 }
+
+{
+    # [perl #17753] segfault when undef'ing unquoted string constant
+    eval 'undef tcp';
+    print $@ =~ /^Can't modify constant item/ ? "ok 28\n" : "not ok 28\n";
+}