summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-10-27 21:32:30 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-10-27 21:32:30 +0000
commitbca6c107bab5aabfb35be60303a5b31e9c9ec4a4 (patch)
tree79bf0e7823de9ee0de4c8197e29dba1118b79184 /t
parentd543acb6a7b5779dc3f569b762833cd9da27fd50 (diff)
parent8f753cb54274cceba5865fd4e206073865f6e190 (diff)
downloadperl-bca6c107bab5aabfb35be60303a5b31e9c9ec4a4.tar.gz
integrate cfgperl contents into mainline; merge conflicts
p4raw-id: //depot/perl@4475
Diffstat (limited to 't')
-rw-r--r--t/lib/charnames.t22
-rw-r--r--t/lib/io_unix.t4
-rwxr-xr-xt/lib/ipc_sysv.t52
-rwxr-xr-xt/op/array.t7
4 files changed, 72 insertions, 13 deletions
diff --git a/t/lib/charnames.t b/t/lib/charnames.t
index 8d5c8db384..b03083e6d1 100644
--- a/t/lib/charnames.t
+++ b/t/lib/charnames.t
@@ -15,24 +15,28 @@ use charnames ':full';
print "not " unless "Here\N{EXCLAMATION MARK}?" eq 'Here!?';
print "ok 1\n";
-print "# \$res=$res \$\@='$@'\nnot "
- if $res = eval <<'EOE'
+{
+ no utf8; # UTEST can switch it on
+
+ print "# \$res=$res \$\@='$@'\nnot "
+ if $res = eval <<'EOE'
use charnames ":full";
"Here: \N{CYRILLIC SMALL LETTER BE}!";
1
EOE
- or $@ !~ /above 0xFF/;
-print "ok 2\n";
-# print "# \$res=$res \$\@='$@'\n";
+ or $@ !~ /above 0xFF/;
+ print "ok 2\n";
+ # print "# \$res=$res \$\@='$@'\n";
-print "# \$res=$res \$\@='$@'\nnot "
- if $res = eval <<'EOE'
+ print "# \$res=$res \$\@='$@'\nnot "
+ if $res = eval <<'EOE'
use charnames 'cyrillic';
"Here: \N{Be}!";
1
EOE
- or $@ !~ /CYRILLIC CAPITAL LETTER BE.*above 0xFF/;
-print "ok 3\n";
+ or $@ !~ /CYRILLIC CAPITAL LETTER BE.*above 0xFF/;
+ print "ok 3\n";
+}
# If octal representation of unicode char is \0xyzt, then the utf8 is \3xy\2zt
$encoded_be = "\320\261";
diff --git a/t/lib/io_unix.t b/t/lib/io_unix.t
index 7338861fb4..0e559e0d90 100644
--- a/t/lib/io_unix.t
+++ b/t/lib/io_unix.t
@@ -5,6 +5,10 @@ BEGIN {
chdir 't' if -d 't';
unshift @INC, '../lib' if -d '../lib';
}
+ # ``use IO::Socket'' executes too early below in the os2 block
+ if ($^O eq 'dos') {
+ print "1..0 # Skip: no fork\n";
+ }
}
use Config;
diff --git a/t/lib/ipc_sysv.t b/t/lib/ipc_sysv.t
index 00a157ba54..9777292f37 100755
--- a/t/lib/ipc_sysv.t
+++ b/t/lib/ipc_sysv.t
@@ -77,8 +77,34 @@ if ($Config{'d_msgget'} eq 'define' &&
my $msgtype = 1;
my $msgtext = "hello";
- msgsnd($msg,pack("L a*",$msgtype,$msgtext),0) or print "not ";
+ my $test2bad;
+ my $test5bad;
+ my $test6bad;
+
+ unless (msgsnd($msg,pack("L a*",$msgtype,$msgtext),IPC_NOWAIT)) {
+ print "not ";
+ $test2bad = 1;
+ }
print "ok 2\n";
+ if ($test2bad) {
+ print <<EOM;
+#
+# The failure of the subtest #2 may indicate that the message queue
+# resource limits either of the system or of the testing account
+# have been reached. Error message "Operating would block" is
+# usually indicative of this situation. The error message was now:
+# "$!"
+#
+# You can check the message queues with the 'ipcs' command and
+# you can remove unneeded queues with the 'ipcrm -q id' command.
+# You may also consider configuring your system or account
+# to have more message queue resources.
+#
+# Because of the subtest #2 failing also the substests #5 and #6 will
+# very probably also fail.
+#
+EOM
+ }
my $data;
msgctl($msg,IPC_STAT,$data) or print "not ";
@@ -88,13 +114,33 @@ if ($Config{'d_msgget'} eq 'define' &&
print "ok 4\n";
my $msgbuf;
- msgrcv($msg,$msgbuf,256,0,IPC_NOWAIT) or print "not ";
+ unless (msgrcv($msg,$msgbuf,256,0,IPC_NOWAIT)) {
+ print "not ";
+ $test5bad = 1;
+ }
print "ok 5\n";
+ if ($test5bad && $test2bad) {
+ print <<EOM;
+#
+# This failure was to be expected because the subtest #2 failed.
+#
+EOM
+ }
my($rmsgtype,$rmsgtext) = unpack("L a*",$msgbuf);
- print "not " unless($rmsgtype == $msgtype && $rmsgtext eq $msgtext);
+ unless($rmsgtype == $msgtype && $rmsgtext eq $msgtext) {
+ print "not ";
+ $test6bad = 1;
+ }
print "ok 6\n";
+ if ($test6bad && $test2bad) {
+ print <<EOM;
+#
+# This failure was to be expected because the subtest #2 failed.
+#
+EOM
+ }
} else {
for (1..6) {
print "ok $_\n"; # fake it
diff --git a/t/op/array.t b/t/op/array.t
index 3409556396..1108f494f8 100755
--- a/t/op/array.t
+++ b/t/op/array.t
@@ -1,6 +1,6 @@
#!./perl
-print "1..65\n";
+print "1..66\n";
#
# @foo, @bar, and @ary are also used from tie-stdarray after tie-ing them
@@ -211,3 +211,8 @@ my $t = 63;
sub reify { $_[1] = ++$t; print "@_\n"; }
reify('ok');
reify('ok');
+
+# qw() is no more a runtime split, it's compiletime.
+print "not " unless qw(foo bar snorfle)[2] eq 'snorfle';
+print "ok 66\n";
+