Author: pschweitzer
Date: Wed Feb 23 10:20:23 2011
New Revision: 50870
URL:
http://svn.reactos.org/svn/reactos?rev=50870&view=rev
Log:
[KMTEST]
Adding more tests for FsRtlIs*InExpression() functions.
All are failing (overrun / wrong result).
Based on Thomas Faber's C program.
See bug #5923
Modified:
trunk/rostests/drivers/kmtest/ntos_fsrtl.c
Modified: trunk/rostests/drivers/kmtest/ntos_fsrtl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/drivers/kmtest/ntos_fsrtl…
==============================================================================
--- trunk/rostests/drivers/kmtest/ntos_fsrtl.c [iso-8859-1] (original)
+++ trunk/rostests/drivers/kmtest/ntos_fsrtl.c [iso-8859-1] Wed Feb 23 10:20:23 2011
@@ -161,6 +161,22 @@
ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE,
"expected TRUE, got FALSE");
RtlInitUnicodeString(&Name, L"aaaa");
ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE,
"expected TRUE, got FALSE");
+
+ /* Tests from #5923 */
+ RtlInitUnicodeString(&Expression, L"C:\\ReactOS\\**");
+ RtlInitUnicodeString(&Name, L"C:\\ReactOS\\dings.bmp");
+ ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE,
"expected TRUE, got FALSE");
+ RtlInitUnicodeString(&Expression, L"C:\\ReactOS\\***");
+ ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE,
"expected TRUE, got FALSE");
+ RtlInitUnicodeString(&Expression, L"C:\\Windows\\*a*");
+ ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE,
"expected FALSE, got TRUE");
+
+ RtlInitUnicodeString(&Expression, L"C:\\ReactOS\\*.bmp");
+ RtlInitUnicodeString(&Name, L"C:\\Windows\\explorer.exe");
+ ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE,
"expected FALSE, got TRUE");
+ RtlInitUnicodeString(&Expression, L"*.bmp;*.dib");
+ RtlInitUnicodeString(&Name, L"winhlp32.exe");
+ ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE,
"expected FALSE, got TRUE");
}
VOID FsRtlIsDbcsInExpressionTest()
@@ -295,6 +311,22 @@
ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE,
got FALSE");
RtlInitAnsiString(&Name, "aaaa");
ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE,
got FALSE");
+
+ /* Tests from #5923 */
+ RtlInitAnsiString(&Expression, "C:\\ReactOS\\**");
+ RtlInitAnsiString(&Name, "C:\\ReactOS\\dings.bmp");
+ ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE,
got FALSE");
+ RtlInitAnsiString(&Expression, "C:\\ReactOS\\***");
+ ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE,
got FALSE");
+ RtlInitAnsiString(&Expression, "C:\\Windows\\*a*");
+ ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected
FALSE, got TRUE");
+
+ RtlInitAnsiString(&Expression, "C:\\ReactOS\\*.bmp");
+ RtlInitAnsiString(&Name, "C:\\Windows\\explorer.exe");
+ ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected
FALSE, got TRUE");
+ RtlInitAnsiString(&Expression, "*.bmp;*.dib");
+ RtlInitAnsiString(&Name, "winhlp32.exe");
+ ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected
FALSE, got TRUE");
}
/* PUBLIC FUNCTIONS ***********************************************************/