From: H.Merijn Brand Date: Mon, 18 Jul 2005 11:02:01 +0000 (+0000) Subject: tests are expected to fail if dirfd () does not exist X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ac49b0251b62a2ed1e5f0e17d1c256ce3f88d6dd;p=p5sagit%2Fp5-mst-13.2.git tests are expected to fail if dirfd () does not exist make the tests to expect failures in that case p4raw-id: //depot/perl@25170 --- 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"); }