Add a test that shows that _splitpath() null-terminates drive

svn path=/trunk/; revision=69661
This commit is contained in:
Pierre Schweitzer 2015-10-24 08:20:05 +00:00
parent 259db826a9
commit 34c9b63005

View file

@ -22,11 +22,13 @@ START_TEST(splitpath)
Major = (DWORD)(LOBYTE(LOWORD(GetVersion()))); Major = (DWORD)(LOBYTE(LOWORD(GetVersion())));
drive[2] = 0xFF;
_splitpath("c:\\dir1\\dir2\\file.ext", drive, dir, fname, ext); _splitpath("c:\\dir1\\dir2\\file.ext", drive, dir, fname, ext);
ok_str(drive, "c:"); ok_str(drive, "c:");
ok_str(dir, "\\dir1\\dir2\\"); ok_str(dir, "\\dir1\\dir2\\");
ok_str(fname, "file"); ok_str(fname, "file");
ok_str(ext, ".ext"); ok_str(ext, ".ext");
ok_int(drive[2], 0);
*_errno() = 0; *_errno() = 0;
_splitpath("c:\\dir1\\dir2\\file.ext", 0, 0, 0, 0); _splitpath("c:\\dir1\\dir2\\file.ext", 0, 0, 0, 0);