2 * PROJECT: ReactOS api tests
3 * LICENSE: GPL - See COPYING in the top level directory
4 * PURPOSE: Test for _splitpath
5 * PROGRAMMER: Timo Kreuzer
23 Major
= (DWORD
)(LOBYTE(LOWORD(GetVersion())));
26 _splitpath("c:\\dir1\\dir2\\file.ext", drive
, dir
, fname
, ext
);
28 ok_str(dir
, "\\dir1\\dir2\\");
29 ok_str(fname
, "file");
34 _splitpath("c:\\dir1\\dir2\\file.ext", 0, 0, 0, 0);
40 _splitpath(0, drive
, dir
, fname
, ext
);
41 ok_int(*_errno(), EINVAL
);
49 win_skip("This test only succeed on NT6+\n");
52 _splitpath("\\\\?\\c:\\dir1\\dir2\\file.ext", drive
, dir
, fname
, ext
);
56 ok_str(dir
, "\\dir1\\dir2\\");
61 ok_str(dir
, "\\\\?\\c:\\dir1\\dir2\\");
63 ok_str(fname
, "file");
66 _splitpath("ab:\\dir1\\..\\file", drive
, dir
, fname
, ext
);
68 ok_str(dir
, "ab:\\dir1\\..\\");
69 ok_str(fname
, "file");
72 _splitpath("//?/c:/dir1/dir2/file.ext", drive
, dir
, fname
, ext
);
74 ok_str(dir
, "//?/c:/dir1/dir2/");
75 ok_str(fname
, "file");
78 _splitpath("\\\\?\\0:/dir1\\dir2/file.", drive
, dir
, fname
, ext
);
82 ok_str(dir
, "/dir1\\dir2/");
87 ok_str(dir
, "\\\\?\\0:/dir1\\dir2/");
89 ok_str(fname
, "file");
92 _splitpath("\\\\.\\c:\\dir1\\dir2\\.ext.ext2", drive
, dir
, fname
, ext
);
94 ok_str(dir
, "\\\\.\\c:\\dir1\\dir2\\");
95 ok_str(fname
, ".ext");
98 _splitpath("\\??\\c:\\dir1\\dir2\\file. ~ ", drive
, dir
, fname
, ext
);
100 ok_str(dir
, "\\??\\c:\\dir1\\dir2\\");
101 ok_str(fname
, "file");
104 _splitpath("x: dir1\\/dir2 \\.blub", drive
, dir
, fname
, ext
);
106 ok_str(dir
, " dir1\\/dir2 \\");
108 ok_str(ext
, ".blub");
110 _splitpath("/:\\dir1\\dir2\\file.ext", drive
, dir
, fname
, ext
);
112 ok_str(dir
, "\\dir1\\dir2\\");
113 ok_str(fname
, "file");