[PATCH] kernel32/tests: Add tests for FindFirstFileA with invalid characters.
Alexandre Julliard
julliard at winehq.org
Mon Mar 25 10:16:42 CDT 2019
Vijay Kiran Kamuju <infyquest at gmail.com> writes:
> Includes testcases by Vincent Pelletier.
> Mark some test as todo.
>
> From: Michael Müller <michael at fds-team.de>
>
> Signed-off-by: Vijay Kiran Kamuju <infyquest at gmail.com>
> ---
> dlls/kernel32/tests/file.c | 109 ++++++++++++++++++++++++++++++++++++-
> 1 file changed, 108 insertions(+), 1 deletion(-)
>
> diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c
> index 33b17aa327..0aa1bff177 100644
> --- a/dlls/kernel32/tests/file.c
> +++ b/dlls/kernel32/tests/file.c
> @@ -2543,11 +2543,86 @@ static char get_windows_drive(void)
> return windowsdir[0];
> }
>
> +struct
> +{
> + const char *path;
> + BOOL expected;
> + BOOL todo;
> +}
> +static const invalid_char_tests[] =
> +{
> + { "./test-dir", TRUE },
> + { "./test-dir/", FALSE },
> + { ".\\test-dir", TRUE },
> + { ".\\test-dir\\", FALSE },
> + { "/>test-dir", FALSE },
> + { "<\"test->dir", FALSE },
> + { "<test->dir", FALSE },
> + { "><test->dir", FALSE },
> + { ">>test-dir", FALSE },
> + { ">test->dir", FALSE },
> + { ">test-dir", FALSE },
> + { "\"test-dir\"", FALSE },
> + { "\"test-file\"", FALSE },
> + { "test-/>dir", FALSE },
> + { "test-dir/", FALSE },
> + { "test-dir//", FALSE },
> + { "test-dir/:", FALSE },
> + { "test-dir/<", TRUE, TRUE },
> + { "test-dir/>", TRUE, TRUE },
> + { "test-dir/\"", TRUE, TRUE },
> + { "test-dir/\\", FALSE },
> + { "test-dir/|", FALSE },
> + { "test-dir<", TRUE, TRUE },
> + { "test-dir</", FALSE },
> + { "test-dir<<", TRUE, TRUE },
> + { "test-dir<<<><><>\"\"\"\"<<<>", TRUE, TRUE },
> + { "test-dir<>", TRUE, TRUE },
> + { "test-dir<\"", TRUE, TRUE },
> + { "test-dir>", TRUE, TRUE },
> + { "test-dir>/", FALSE },
> + { "test-dir><", TRUE, TRUE },
> + { "test-dir>>", TRUE, TRUE },
> + { "test-dir>\"", TRUE, TRUE },
> + { "test-dir\"", TRUE, TRUE },
> + { "test-dir\"/", FALSE },
> + { "test-dir\"<", TRUE, TRUE },
> + { "test-dir\">", TRUE, TRUE },
> + { "test-dir\"\"", TRUE, TRUE },
> + { "test-dir\"\"\"\"\"", TRUE, TRUE },
> + { "test-dir\\", FALSE },
> + { "test-dir\\/", FALSE },
> + { "test-dir\\<", TRUE, TRUE },
> + { "test-dir\\>", TRUE, TRUE },
> + { "test-dir\\\"", TRUE, TRUE },
> + { "test-dir\\\\", FALSE },
> + { "test-file/", FALSE },
> + { "test-file/<", FALSE },
> + { "test-file/>", FALSE },
> + { "test-file/\"", FALSE },
> + { "test-file<", TRUE, TRUE },
> + { "test-file<<", TRUE, TRUE },
> + { "test-file<>", TRUE, TRUE },
> + { "test-file<\"", TRUE, TRUE },
> + { "test-file>", TRUE, TRUE },
> + { "test-file><", TRUE, TRUE },
> + { "test-file>>", TRUE, TRUE },
> + { "test-file>\"", TRUE, TRUE },
> + { "test-file\"", TRUE, TRUE },
> + { "test-file\"<", TRUE, TRUE },
> + { "test-file\">", TRUE, TRUE },
> + { "test-file\"\"", TRUE, TRUE },
> + { "test-file\\", FALSE },
> + { "test-file\\<", FALSE },
> + { "test-file\\>", FALSE },
> + { "test-file\\\"", FALSE },
> +};
These look like they are testing the same thing over and over again.
I doubt you need all these combinations of the same few chars; testing
some other characters instead would be more interesting.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list