diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 2002-03-21 07:21:57 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 2002-03-21 07:21:57 +0000 |
commit | d6b7ef8642dbff7f74dde11fd4995a37e8f38c04 (patch) | |
tree | 514a910b6cf95741dcc0cfcb9c933516785d103b /t | |
parent | 4cbf5a93b15a5783cbe69de6f4f935df308853d2 (diff) | |
download | perl-d6b7ef8642dbff7f74dde11fd4995a37e8f38c04.tar.gz |
Integrate mainline (Win2k/MinGW all ok except threads/t/end.t)
p4raw-id: //depot/perlio@15382
Diffstat (limited to 't')
-rwxr-xr-x | t/io/fs.t | 28 | ||||
-rw-r--r-- | t/lib/1_compile.t | 26 | ||||
-rwxr-xr-x | t/op/exec.t | 2 | ||||
-rwxr-xr-x | t/op/magic.t | 4 | ||||
-rwxr-xr-x | t/op/pat.t | 43 |
5 files changed, 93 insertions, 10 deletions
@@ -41,6 +41,9 @@ my $needs_fh_reopen = $needs_fh_reopen = 1 if (defined &Win32::IsWin95 && Win32::IsWin95()); +my $skip_mode_checks = + $^O eq 'cygwin' && $ENV{CYGWIN} !~ /ntsec/; + plan tests => 36; @@ -93,8 +96,13 @@ SKIP: { SKIP: { skip "hard links not that hard in $^O", 1 if $^O eq 'amigaos'; + skip "no mode checks", 1 if $skip_mode_checks; - is($mode & 0777, 0666, "mode of triply-linked file"); + if ($^O eq 'cygwin') { # new files on cygwin get rwx instead of rw- + is($mode & 0777, 0777, "mode of triply-linked file"); + } else { + is($mode & 0777, 0666, "mode of triply-linked file"); + } } } @@ -108,7 +116,11 @@ SKIP: { ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, $blksize,$blocks) = stat('c'); - is($mode & 0777, $newmode, "chmod going through"); + SKIP: { + skip "no mode checks", 1 if $skip_mode_checks; + + is($mode & 0777, $newmode, "chmod going through"); + } $newmode = 0700; chmod 0444, 'x'; @@ -119,12 +131,20 @@ SKIP: { ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, $blksize,$blocks) = stat('c'); - is($mode & 0777, $newmode, "chmod going through to c"); + SKIP: { + skip "no mode checks", 1 if $skip_mode_checks; + + is($mode & 0777, $newmode, "chmod going through to c"); + } ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, $blksize,$blocks) = stat('x'); - is($mode & 0777, $newmode, "chmod going through to x"); + SKIP: { + skip "no mode checks", 1 if $skip_mode_checks; + + is($mode & 0777, $newmode, "chmod going through to x"); + } is(unlink('b','x'), 2, "unlink two files"); diff --git a/t/lib/1_compile.t b/t/lib/1_compile.t index 762418177f..9035886be0 100644 --- a/t/lib/1_compile.t +++ b/t/lib/1_compile.t @@ -114,9 +114,17 @@ foreach my $mod (<DATA>) { my @Core_Modules = sort keys %Core_Modules; -print "1..".@Core_Modules."\n"; +print "1..".(1+@Core_Modules)."\n"; -my $test_num = 1; +my $message + = "ok 1 - All modules should have tests # TODO Make Schwern Poorer\n"; +if (@Core_Modules) { + print "not $message"; +} else { + print $message; +} + +my $test_num = 2; foreach my $module (@Core_Modules) { print "$module compile failed\nnot " unless compile_module($module); @@ -149,8 +157,15 @@ CGI::Util Carp::Heavy CPAN::Nox Exporter::Heavy +ExtUtils::Command ExtUtils::Constant +ExtUtils::Embed +ExtUtils::Installed ExtUtils::MakeMaker +ExtUtils::Manifest +ExtUtils::Mkbootstrap +ExtUtils::Packlist +File::Spec::Functions Filter::Util::Call GDBM_File I18N::LangTags::List @@ -168,6 +183,7 @@ Locale::Constants Locale::Country Locale::Currency Locale::Language +Locale::Script MIME::QuotedPrint Math::BigFloat Math::BigInt::Calc @@ -188,11 +204,14 @@ Net::Time ODBM_File Pod::Checker Pod::Find +Pod::Functions Pod::Html +Pod::InputObjects Pod::LaTeX Pod::Man Pod::ParseLink Pod::ParseUtils +Pod::Select Pod::Text Pod::Text::Overstrike Pod::Text::Termcap @@ -201,6 +220,9 @@ SDBM_File Safe Scalar::Util Sys::Syslog +Test::Builder +Test::Harness::Assert +Test::Harness::Straps Test::More Test::ParseWords Text::Tabs diff --git a/t/op/exec.t b/t/op/exec.t index bbab0fbba5..4c1b36ae2e 100755 --- a/t/op/exec.t +++ b/t/op/exec.t @@ -83,7 +83,7 @@ is( system(qq{$Perl "-I../lib" -e "use vmsish qw(hushed); exit 1"}), $exit_one, $rc = system "lskdfj"; -unless( ok($rc == 255 << 8 or $rc == -1 or $rc == 256) ) { +unless( ok($rc == 255 << 8 or $rc == -1 or $rc == 256 or $rc == 512) ) { print "# \$rc == $rc\n"; } diff --git a/t/op/magic.t b/t/op/magic.t index ede0b8b2ef..139f723c1b 100755 --- a/t/op/magic.t +++ b/t/op/magic.t @@ -55,7 +55,7 @@ $PERL = ($Is_NetWare ? 'perl' : eval '$ENV{"FOO"} = "hi there";'; # check that ENV is inited inside eval # cmd.exe will echo 'variable=value' but 4nt will echo just the value # -- Nikola Knezevic -if ($Is_MSWin32) { ok `set FOO` =~ /^(FOO=)?hi there$/; } +if ($Is_MSWin32) { ok `set FOO` =~ /^(?:FOO=)?hi there$/; } elsif ($Is_MacOS) { ok "1 # skipped", 1; } elsif ($Is_VMS) { ok `write sys\$output f\$trnlnm("FOO")` eq "hi there\n"; } else { ok `echo \$FOO` eq "hi there\n"; } @@ -246,7 +246,7 @@ else { $0 = "bar"; # cmd.exe will echo 'variable=value' but 4nt will echo just the value # -- Nikola Knezevic - ok ($Is_MSWin32 ? (`set __NoNeSuCh` =~ /^(__NoNeSuCh=)?foo$/) + ok ($Is_MSWin32 ? (`set __NoNeSuCh` =~ /^(?:__NoNeSuCh=)?foo$/) : (`echo \$__NoNeSuCh` eq "foo\n") ); } diff --git a/t/op/pat.t b/t/op/pat.t index a00e624bf4..b5dff4b7e3 100755 --- a/t/op/pat.t +++ b/t/op/pat.t @@ -6,7 +6,7 @@ $| = 1; -print "1..864\n"; +print "1..892\n"; BEGIN { chdir 't' if -d 't'; @@ -2730,3 +2730,44 @@ print "# some Unicode properties\n"; print $u eq "feeber" ? "ok 864\n" : "not ok 864\n"; } +{ + print "# UTF-8 bug with s///\n"; + # check utf8/non-utf8 mixtures + # try to force all float/anchored check combinations + my $c = "\x{100}"; + my $test = 865; + my $subst; + for my $re ( + "xx.*$c", "x.*$c$c", "$c.*xx", "$c$c.*x", "xx.*(?=$c)", "(?=$c).*xx", + ) { + print "xxx" =~ /$re/ ? "not ok $test\n" : "ok $test\n"; + ++$test; + print +($subst = "xxx") =~ s/$re// ? "not ok $test\n" : "ok $test\n"; + ++$test; + } + for my $re ("xx.*$c*", "$c*.*xx") { + print "xxx" =~ /$re/ ? "ok $test\n" : "not ok $test\n"; + ++$test; + ($subst = "xxx") =~ s/$re//; + print $subst eq '' ? "ok $test\n" : "not ok $test\t# $subst\n"; + ++$test; + } + for my $re ("xxy*", "y*xx") { + print "xx$c" =~ /$re/ ? "ok $test\n" : "not ok $test\n"; + ++$test; + ($subst = "xx$c") =~ s/$re//; + print $subst eq $c ? "ok $test\n" : "not ok $test\n"; + ++$test; + print "xy$c" =~ /$re/ ? "not ok $test\n" : "ok $test\n"; + ++$test; + print +($subst = "xy$c") =~ /$re/ ? "not ok $test\n" : "ok $test\n"; + ++$test; + } + for my $re ("xy$c*z", "x$c*yz") { + print "xyz" =~ /$re/ ? "ok $test\n" : "not ok $test\n"; + ++$test; + ($subst = "xyz") =~ s/$re//; + print $subst eq '' ? "ok $test\n" : "not ok $test\n"; + ++$test; + } +} |