[Midnightbsd-cvs] src [6448] trunk/contrib/perl/t/win32/fs.t: this is missing from the merge
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Tue Dec 3 18:33:50 EST 2013
Revision: 6448
http://svnweb.midnightbsd.org/src/?rev=6448
Author: laffer1
Date: 2013-12-03 18:33:50 -0500 (Tue, 03 Dec 2013)
Log Message:
-----------
this is missing from the merge
Added Paths:
-----------
trunk/contrib/perl/t/win32/fs.t
Added: trunk/contrib/perl/t/win32/fs.t
===================================================================
--- trunk/contrib/perl/t/win32/fs.t (rev 0)
+++ trunk/contrib/perl/t/win32/fs.t 2013-12-03 23:33:50 UTC (rev 6448)
@@ -0,0 +1,28 @@
+#!./perl
+
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ require "./test.pl";
+ eval 'use Errno';
+ die $@ if $@ and !is_miniperl();
+}
+
+plan tests => 4;
+
+my $tmpfile1 = tempfile();
+my $tmpfile2 = tempfile();
+
+# RT #112272
+ok(!link($tmpfile1, $tmpfile2),
+ "Cannot link to unknown file");
+is(0+$!, &Errno::ENOENT, "check errno is ENOENT");
+open my $fh, ">", $tmpfile1
+ or skip("Cannot create test link src", 2);
+close $fh;
+open my $fh, ">", $tmpfile2
+ or skip("Cannot create test link target", 2);
+close $fh;
+ok(!link($tmpfile1, $tmpfile2),
+ "Cannot link to existing file");
+is(0+$!, &Errno::EEXIST, "check for EEXIST");
More information about the Midnightbsd-cvs
mailing list