[1/2] msvcrt/tests: test _dup2 for failure when second arg is negative

Jeff Zaroyko jeffzaroyko at gmail.com
Mon Jan 11 21:25:51 CST 2010


Test passes on Windows 95 and Windows Vista.
-------------- next part --------------
From 8cac12931c95c7982f37847ed53285a5be88dac0 Mon Sep 17 00:00:00 2001
From: Jeff Zaroyko <jeffz at jeffz.name>
Date: Tue, 12 Jan 2010 14:13:10 +1100
Subject: msvcrt/tests: test _dup2 for failure when second arg is negative

---
 dlls/msvcrt/tests/file.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/dlls/msvcrt/tests/file.c b/dlls/msvcrt/tests/file.c
index da3d16c..27d64bd 100644
--- a/dlls/msvcrt/tests/file.c
+++ b/dlls/msvcrt/tests/file.c
@@ -1361,6 +1361,11 @@ static void test_unlink(void)
     rmdir("test_unlink");
 }
 
+void test_dup2(void)
+{
+    todo_wine ok(-1 == _dup2(0, -1), "expected _dup2 to fail when second arg is negative\n" );
+}
+
 START_TEST(file)
 {
     int arg_c;
@@ -1381,6 +1386,7 @@ START_TEST(file)
             ok(0, "invalid argument '%s'\n", arg_v[2]);
         return;
     }
+    test_dup2();
     test_file_inherit(arg_v[0]);
     test_file_write_read();
     test_chsize();
-- 
1.5.4.3


More information about the wine-patches mailing list