Author: pschweitzer
Date: Tue Mar 13 21:07:55 2012
New Revision: 56141
URL:
http://svn.reactos.org/svn/reactos?rev=56141&view=rev
Log:
[KMTEST]
Add a few more tests. Two should fail on ReactOS
Modified:
trunk/rostests/kmtests/ntos_fsrtl/FsRtlExpression.c
Modified: trunk/rostests/kmtests/ntos_fsrtl/FsRtlExpression.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/ntos_fsrtl/FsRtlE…
==============================================================================
--- trunk/rostests/kmtests/ntos_fsrtl/FsRtlExpression.c [iso-8859-1] (original)
+++ trunk/rostests/kmtests/ntos_fsrtl/FsRtlExpression.c [iso-8859-1] Tue Mar 13 21:07:55
2012
@@ -24,6 +24,12 @@
ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE,
"expected FALSE, got TRUE");
RtlInitUnicodeString(&Expression, L"");
ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE,
"expected TRUE, got FALSE");
+
+ RtlInitUnicodeString(&Expression, L"**");
+ RtlInitUnicodeString(&Name, L"");
+ ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE,
"expected FALSE, got TRUE");
+ RtlInitUnicodeString(&Name, L"a");
+ ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE,
"expected TRUE, got FALSE");
}
RtlInitUnicodeString(&Expression, L"ntdll.dll");
@@ -174,6 +180,14 @@
/* Backtracking tests */
RtlInitUnicodeString(&Expression, L"*.*.*.*");
RtlInitUnicodeString(&Name, L"127.0.0.1");
+ ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE,
"expected TRUE, got FALSE");
+
+ RtlInitUnicodeString(&Expression, L"*?*?*?*");
+ RtlInitUnicodeString(&Name, L"1.0.0.1");
+ ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE,
"expected TRUE, got FALSE");
+ RtlInitUnicodeString(&Expression, L"?*?*?*?");
+ ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE,
"expected TRUE, got FALSE");
+ RtlInitUnicodeString(&Expression, L"?.?.?.?");
ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE,
"expected TRUE, got FALSE");
RtlInitUnicodeString(&Expression, L"*a*ab*abc");
@@ -192,6 +206,12 @@
ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected
FALSE, got TRUE");
RtlInitAnsiString(&Expression, "");
ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected
TRUE, got FALSE");
+
+ RtlInitAnsiString(&Expression, "**");
+ RtlInitAnsiString(&Name, "");
+ ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected
FALSE, got TRUE");
+ RtlInitAnsiString(&Name, "a");
+ ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected
TRUE, got FALSE");
}
RtlInitAnsiString(&Expression, "ntdll.dll");
@@ -339,9 +359,17 @@
RtlInitAnsiString(&Name, "winhlp32.exe");
ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected
FALSE, got TRUE");
- /* Backtracking tetss */
+ /* Backtracking tests */
RtlInitAnsiString(&Expression, "*.*.*.*");
RtlInitAnsiString(&Name, "127.0.0.1");
+ ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE,
got FALSE");
+
+ RtlInitAnsiString(&Expression, "*?*?*?*");
+ RtlInitAnsiString(&Name, "1.0.0.1");
+ ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE,
got FALSE");
+ RtlInitAnsiString(&Expression, "?*?*?*?");
+ ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE,
got FALSE");
+ RtlInitAnsiString(&Expression, "?.?.?.?");
ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE,
got FALSE");
RtlInitAnsiString(&Expression, "*a*ab*abc");