From ac49b0251b62a2ed1e5f0e17d1c256ce3f88d6dd Mon Sep 17 00:00:00 2001 From: "H.Merijn Brand" Date: Mon, 18 Jul 2005 11:02:01 +0000 Subject: [PATCH] tests are expected to fail if dirfd () does not exist make the tests to expect failures in that case p4raw-id: //depot/perl@25170 --- t/op/chdir.t | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/t/op/chdir.t b/t/op/chdir.t index 14024a6..3a00df2 100644 --- a/t/op/chdir.t +++ b/t/op/chdir.t @@ -48,7 +48,14 @@ SKIP: { ok(open(my $fh, "<", "op"), "open op"); ok(chdir($fh), "fchdir op"); ok(-f "chdir.t", "verify that we are in op"); - ok(chdir($dh), "fchdir back"); + if (($Config{d_dirfd} || "") eq "define") { + ok(chdir($dh), "fchdir back"); + } + else { + eval { chdir($dh); }; + like($@, qr/^The dirfd function is unimplemented at/, "dirfd is unimplemented"); + chdir ".."; + } ok(-d "op", "verify that we are back"); } -- 2.7.4