Alistair wrote:
- /* try an invalid list, only one null terminator */
- init_shfo_tests();
- shfo.pFrom = "";
- shfo.wFunc = FO_DELETE;
- ret = SHFileOperation(&shfo);
- ok(ret == ERROR_ACCESS_DENIED, "Expected ERROR_ACCESS_DENIED, got %d\n", ret);
- ok(file_exists("test1.txt"), "Expected test1.txt to exist\n");
- /* This crashes under win98 */
- if(0)
- {
/* try an invalid list, only one null terminator */
Hey Allistair, that paragraph looks like it was buggy - it should have had test1.txt followed by a single nul and then twice MAXPATH nonnulls and then a double nul, like the similar tests I fixed in http://www.winehq.org/pipermail/wine-patches/2008-May/055371.html As it is, there's no way FO_DELETE could see test1.txt to maybe delete it.
James, do you agree?
Perhaps you could leave it enabled if you fixed it like the ones I fixed. (Or tried to fix; sadly, Alexandre hasn't committed it yet. Why?) - Dan
"Dan Kegel" dank@kegel.com writes:
Perhaps you could leave it enabled if you fixed it like the ones I fixed. (Or tried to fix; sadly, Alexandre hasn't committed it yet. Why?)
Because your patch was also making unrelated and incorrect changes to the code. If you resubmit just the test changes they'd probably go in.
On Tue, Jun 10, 2008 at 7:13 AM, Dan Kegel dank@kegel.com wrote:
Alistair wrote:
- /* try an invalid list, only one null terminator */
- init_shfo_tests();
- shfo.pFrom = "";
- shfo.wFunc = FO_DELETE;
- ret = SHFileOperation(&shfo);
- ok(ret == ERROR_ACCESS_DENIED, "Expected ERROR_ACCESS_DENIED, got %d\n", ret);
- ok(file_exists("test1.txt"), "Expected test1.txt to exist\n");
- /* This crashes under win98 */
- if(0)
- {
/* try an invalid list, only one null terminator */
Hey Allistair, that paragraph looks like it was buggy - it should have had test1.txt followed by a single nul and then twice MAXPATH nonnulls and then a double nul, like the similar tests I fixed in http://www.winehq.org/pipermail/wine-patches/2008-May/055371.html As it is, there's no way FO_DELETE could see test1.txt to maybe delete it.
James, do you agree?
No, the test is exactly what the comment says: invalid list (empty) with one NULL terminator. I'm fine with it being if-def'ed out if it crashes in win98.
On Tue, Jun 10, 2008 at 5:50 AM, James Hawkins truiken@gmail.com wrote:
No, the test is exactly what the comment says: invalid list (empty) with one NULL terminator. I'm fine with it being if-def'ed out if it crashes in win98.
I guess I was fooled by the line ok(file_exists("test1.txt"), "Expected test1.txt to exist\n"); Since you didn't feed test1.txt to FO_DELETE, you shouldn't be testing whether it's present.