summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-03-01 02:23:25 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-03-01 02:23:25 +0000
commit7774ecbe52b5651d7f22d02002c5f21317ba609b (patch)
tree7052d570bda83a11ad0557bd63c36135e50df68c /t
parent2457d0415ef2cfd528971518ab73ebd9860f5226 (diff)
downloadperl-7774ecbe52b5651d7f22d02002c5f21317ba609b.tar.gz
Retract #8970 because of a completely mysterious core dump:
adding the tests 241..244 causes op/pat dump core at test #25. The test needs a lot of whittling down before the bug can be solved. p4raw-id: //depot/perl@8973
Diffstat (limited to 't')
-rwxr-xr-xt/op/pat.t58
1 files changed, 16 insertions, 42 deletions
diff --git a/t/op/pat.t b/t/op/pat.t
index 4e91b62f35..237ea44c4e 100755
--- a/t/op/pat.t
+++ b/t/op/pat.t
@@ -4,7 +4,7 @@
# the format supported by op/regexp.t. If you want to add a test
# that does fit that format, add it to op/re_tests, not here.
-print "1..244\n";
+print "1..242\n";
BEGIN {
chdir 't' if -d 't';
@@ -1183,49 +1183,23 @@ if (/(\C)/g) {
}
}
-# Little background for 241..244 -- in EBCDIC:
+# 241..242
#
-# "\x89" eq 'i'
-# "\x91" eq 'i'
-# "\xc9" eq 'I'
-# "\xd1" eq 'J'
-#
-# If the character range is specified using explicit numeric endpoints,
-# non-characters (like \x8e and \xce) should match (241 and 242).
-#
-# If the character range is specified using alphabet endpoints,
-# non-characters (like \x8e and \xce) should not match (243 and 244).
+# The tr is admittedly NOT a regular expression operator,
+# but this test is more of an EBCDIC test, the background is
+# that \x89 is 'i' and \x90 is 'j', and \x8e is not a letter,
+# not even a printable character. Now for the trick:
+# if the range is specified using letters, the \x8e should most
+# probably not match, but if the range is specified using explicit
+# numeric endpoints, it probably should match. The first case,
+# not matching if using letters, is already tested elsewhere,
+# here we test for the matching cases.
-if ("\x8e" =~ /[\x89-\x91]/) {
- print "ok 241\n";
-} else {
- print "not ok 241\n";
-}
+$_ = qq/\x8E/;
-if ("\xce" =~ /[\xc9-\xd1]/) {
- print "ok 242\n";
-} else {
- print "not ok 242\n";
-}
-
-if (ord('i') == 0x89 && ord('j') == 0x91) { # EBCDIC
+print "not " unless /[\x89-\x91]/;
+print "ok 241\n";
-if ("\x8e" !~ /[i-j]/) {
- print "ok 243\n";
-} else {
- print "not ok 243\n";
-}
+print "not " unless tr/\x89-\x91//d == 1;
+print "ok 242\n";
-if ("\xce" !~ /[I-J]/) {
- print "ok 244\n";
-} else {
- print "not ok 244\n";
-}
-
-} else {
-
-for (243..244) {
- print "ok $_ # Skip: not EBCDIC\n";
-}
-
-}