summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2001-03-05 08:35:22 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>2001-03-05 08:35:22 +0000
commit26c1551e60cd5bd52d80b74e7d16ea4a8437d156 (patch)
treec2bb508abae22a4309ea12f381bb6d893dafd8ea /t
parent22b9b55d20128c12483e353debd7b73746ce84e8 (diff)
parent55eda71149148d511e3e5da4f7c4e646dd445502 (diff)
downloadperl-26c1551e60cd5bd52d80b74e7d16ea4a8437d156.tar.gz
Integrate mainline
p4raw-id: //depot/perlio@9027
Diffstat (limited to 't')
-rwxr-xr-xt/lib/syslog.t9
-rwxr-xr-xt/op/pat.t9
-rwxr-xr-xt/op/tr.t35
-rw-r--r--t/pod/find.t21
4 files changed, 49 insertions, 25 deletions
diff --git a/t/lib/syslog.t b/t/lib/syslog.t
index 04adb6bed9..801e882508 100755
--- a/t/lib/syslog.t
+++ b/t/lib/syslog.t
@@ -22,6 +22,15 @@ BEGIN {
}
}
+BEGIN {
+ eval {require Sys::Syslog} or do {
+ if ($@ =~ /Your vendor has not/) {
+ print "1..0 # Skipped: missing macros\n";
+ exit 0;
+ }
+ }
+}
+
use Sys::Syslog qw(:DEFAULT setlogsock);
# Test this to 1 if your syslog accepts udp connections.
diff --git a/t/op/pat.t b/t/op/pat.t
index 237ea44c4e..3a4623d947 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..242\n";
+print "1..243\n";
BEGIN {
chdir 't' if -d 't';
@@ -1203,3 +1203,10 @@ print "ok 241\n";
print "not " unless tr/\x89-\x91//d == 1;
print "ok 242\n";
+{
+ # japhy -- added 03/03/2001
+ () = (my $str = "abc") =~ /(...)/;
+ $str = "def";
+ print "not " if $1 ne "abc";
+ print "ok 243\n";
+}
diff --git a/t/op/tr.t b/t/op/tr.t
index 75887ab31c..eb5c4ca27b 100755
--- a/t/op/tr.t
+++ b/t/op/tr.t
@@ -5,7 +5,7 @@ BEGIN {
@INC = '../lib';
}
-print "1..51\n";
+print "1..57\n";
$_ = "abcdefghijklmnopqrstuvwxyz";
@@ -84,7 +84,7 @@ if (ord("\t") == 9) { # ASCII
use utf8;
}
# 11 - changing UTF8 characters in a UTF8 string, same length.
-$l = chr(300); $r = chr(400);
+my $l = chr(300); my $r = chr(400);
$x = 200.300.400;
$x =~ tr/\x{12c}/\x{190}/;
printf "not (%vd) ", $x if $x ne 200.400.400 or length $x != 3;
@@ -287,7 +287,7 @@ print "ok 48\n";
print "not " unless sprintf("%vd", $a) eq '196.172.200';
print "ok 49\n";
-# UTF8 range
+# UTF8 range tests from Inaba Hiroto
($a = v300.196.172.302.197.172) =~ tr/\x{12c}-\x{130}/\xc0-\xc4/;
print "not " unless $a eq v192.196.172.194.197.172;
@@ -296,3 +296,32 @@ print "ok 50\n";
($a = v300.196.172.302.197.172) =~ tr/\xc4-\xc8/\x{12c}-\x{130}/;
print "not " unless $a eq v300.300.172.302.301.172;
print "ok 51\n";
+
+# UTF8 range tests from Karsten Sperling (patch #9008 required)
+
+($a = "\x{0100}") =~ tr/\x00-\x{100}/X/;
+print "not " unless $a eq "X";
+print "ok 52\n";
+
+($a = "\x{0100}") =~ tr/\x{0000}-\x{00ff}/X/c;
+print "not " unless $a eq "X";
+print "ok 53\n";
+
+($a = "\x{0100}") =~ tr/\x{0000}-\x{00ff}\x{0101}/X/c;
+print "not " unless $a eq "X";
+print "ok 54\n";
+
+($a = v256) =~ tr/\x{0000}-\x{00ff}\x{0101}/X/c;
+print "not " unless $a eq "X";
+print "ok 55\n";
+
+# UTF8 range tests from Inaba Hiroto
+
+($a = "\x{200}") =~ tr/\x00-\x{100}/X/c;
+print "not " unless $a eq "X";
+print "ok 56\n";
+
+($a = "\x{200}") =~ tr/\x00-\x{100}/X/cs;
+print "not " unless $a eq "X";
+print "ok 57\n";
+
diff --git a/t/pod/find.t b/t/pod/find.t
index 701490a183..846b3accb3 100644
--- a/t/pod/find.t
+++ b/t/pod/find.t
@@ -8,27 +8,6 @@ use Test;
BEGIN {
plan tests => 4;
use File::Spec;
- if ($^O eq 'VMS') {
- # This magick is needed to make the VMS I/O system to believe
- # that there's life after eight directory levels (this makes
- # it believe there's life until sixteen levels). The filesystem
- # has no limitation as such.
- $DEFAULT_DIR = $ENV{'DEFAULT'};
- my $here = $DEFAULT_DIR;
- my ($dev,$dir) = File::Spec->splitpath($here);
- $dev =~ s/:$//;
- $dev = $ENV{$dev} if exists($ENV{$dev});
- $dev .= ':' if $dev !~ /:/;
- $here = File::Spec->canonpath($dev.$dir);
- $here =~ s/\]$/.]/;
- system "define/nolog/job/trans=conceal temp_perl_base $here";
- chdir('temp_perl_base:[000000]');
- }
-}
-
-END {
- chdir($DEFAULT_DIR) if $^O eq 'VMS';
- system "deassign/job temp_perl_base";
}
use Pod::Find qw(pod_find pod_where);