summaryrefslogtreecommitdiff
path: root/t/lib
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2001-04-17 20:46:35 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>2001-04-17 20:46:35 +0000
commitd1dacf8593388de51173219ee7381875e2a3ff37 (patch)
treeabf1cdfa19bd862913d23a51b1cec8501fcd511d /t/lib
parentf3e4abaa800bbb711dcb8f685053c82d7b1e90f2 (diff)
parent7040f5d5dc2e04b1a3852403439b05094ab13139 (diff)
downloadperl-d1dacf8593388de51173219ee7381875e2a3ff37.tar.gz
Re-sync for t/lib/b.t fix
p4raw-id: //depot/perlio@9731
Diffstat (limited to 't/lib')
-rwxr-xr-xt/lib/b.t10
-rw-r--r--t/lib/cwd.t46
2 files changed, 33 insertions, 23 deletions
diff --git a/t/lib/b.t b/t/lib/b.t
index 9cadaf706a..7681b4d0da 100755
--- a/t/lib/b.t
+++ b/t/lib/b.t
@@ -25,6 +25,16 @@ use B::Deparse;
my $deparse = B::Deparse->new() or print "not ";
ok;
+# Tell B::Deparse about our ambient pragmas
+{ my ($hint_bits, $warning_bits);
+ BEGIN {($hint_bits, $warning_bits) = ($^H, ${^WARNING_BITS})}
+ $deparse->ambient_pragmas (
+ hint_bits => $hint_bits,
+ warning_bits => $warning_bits,
+ '$[' => 0 + $[
+ );
+}
+
print "not " if "{\n 1;\n}" ne $deparse->coderef2text(sub {1});
ok;
diff --git a/t/lib/cwd.t b/t/lib/cwd.t
index 831ad083cd..5a3ecae4d5 100644
--- a/t/lib/cwd.t
+++ b/t/lib/cwd.t
@@ -105,29 +105,29 @@ else {
}
if ($Config{d_symlink}) {
- my @dirs = grep(! -l $_ => (split " " => $Config{libpth}));
- if (@dirs) {
- my $target = pop @dirs;
- symlink $target => "linktest";
- mkdir "pteerslt";
- chdir "pteerslt";
- my $rel = "../../t/linktest";
-
- my $abs_path = Cwd::abs_path($rel);
- my $fast_abs_path = Cwd::fast_abs_path($rel);
- print "# abs_path $abs_path\n";
- print "# fast_abs_path $fast_abs_path\n";
- print "# target $target\n";
- print +($abs_path eq $target ? "" : "not "), "ok 13\n";
- print +($fast_abs_path eq $target ? "" : "not "), "ok 14\n";
-
- chdir "..";
- rmdir "pteerslt";
- unlink "linktest";
- } else {
- print "ok 13 # skipped\n";
- print "ok 14 # skipped\n";
- }
+ mkdir "pteerslt", 0777;
+ mkdir "pteerslt/path", 0777;
+ mkdir "pteerslt/path/to", 0777;
+ mkdir "pteerslt/path/to/a", 0777;
+ mkdir "pteerslt/path/to/a/dir", 0777;
+ symlink "pteerslt/path/to/a/dir" => "linktest";
+
+ my $abs_path = Cwd::abs_path("linktest");
+ my $fast_abs_path = Cwd::fast_abs_path("linktest");
+ my $want = "t/pteerslt/path/to/a/dir";
+
+ print "# abs_path $abs_path\n";
+ print "# fast_abs_path $fast_abs_path\n";
+ print "# want $want\n";
+ print +($abs_path =~ m|$want$| ? "" : "not "), "ok 13\n";
+ print +($fast_abs_path =~ m|$want$| ? "" : "not "), "ok 14\n";
+
+ rmdir "pteerslt/path/to/a/dir";
+ rmdir "pteerslt/path/to/a";
+ rmdir "pteerslt/path/to";
+ rmdir "pteerslt/path";
+ rmdir "pteerslt";
+ unlink "linktest";
} else {
print "ok 13 # skipped\n";
print "ok 14 # skipped\n";