[ros-diffs] [pschweitzer] 56145: [KMTEST] Finally, add more tests for extra wildcards. They were untested before. There should be several failures

pschweitzer at svn.reactos.org pschweitzer at svn.reactos.org
Wed Mar 14 09:43:18 UTC 2012


Author: pschweitzer
Date: Wed Mar 14 09:43:16 2012
New Revision: 56145

URL: http://svn.reactos.org/svn/reactos?rev=56145&view=rev
Log:
[KMTEST]
Finally, add more tests for extra wildcards. They were untested before.
There should be several failures

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/FsRtlExpression.c?rev=56145&r1=56144&r2=56145&view=diff
==============================================================================
--- trunk/rostests/kmtests/ntos_fsrtl/FsRtlExpression.c [iso-8859-1] (original)
+++ trunk/rostests/kmtests/ntos_fsrtl/FsRtlExpression.c [iso-8859-1] Wed Mar 14 09:43:16 2012
@@ -196,6 +196,38 @@
     RtlInitUnicodeString(&Expression, L"*a*ab*abc");
     RtlInitUnicodeString(&Name, L"aabaabcdadabdabc");
     ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE");
+
+    /* Tests for extra wildcards */
+    RtlInitUnicodeString(&Expression, L"ab<exe");
+    RtlInitUnicodeString(&Name, L"abcd.exe");
+    ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE");
+    RtlInitUnicodeString(&Name, L"ab.exe");
+    ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE");
+    RtlInitUnicodeString(&Name, L"abcdexe");
+    ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE");
+    RtlInitUnicodeString(&Name, L"acd.exe");
+    ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE");
+
+    RtlInitUnicodeString(&Expression, L"abc.exe\"");
+    RtlInitUnicodeString(&Name, L"abc.exe");
+    ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE");
+    RtlInitUnicodeString(&Name, L"abc.exe.");
+    ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE");
+    RtlInitUnicodeString(&Name, L"abc.exe.back");
+    ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE");
+    RtlInitUnicodeString(&Name, L"abc.exes");
+    ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE");
+
+    RtlInitUnicodeString(&Expression, L"a>c.exe");
+    RtlInitUnicodeString(&Name, L"abc.exe");
+    ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE");
+    RtlInitUnicodeString(&Name, L"ac.exe");
+    ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE");
+    RtlInitUnicodeString(&Expression, L"a>>>exe");
+    RtlInitUnicodeString(&Name, L"abc.exe");
+    ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE");
+    RtlInitUnicodeString(&Name, L"ac.exe");
+    ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE");
 }
 
 static VOID FsRtlIsDbcsInExpressionTest()
@@ -381,6 +413,38 @@
     RtlInitAnsiString(&Expression, "*a*ab*abc");
     RtlInitAnsiString(&Name, "aabaabcdadabdabc");
     ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE");
+
+    /* Tests for extra wildcards */
+    RtlInitAnsiString(&Expression, "ab<exe");
+    RtlInitAnsiString(&Name, "abcd.exe");
+    ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE");
+    RtlInitAnsiString(&Name, "ab.exe");
+    ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE");
+    RtlInitAnsiString(&Name, "abcdexe");
+    ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE");
+    RtlInitAnsiString(&Name, "acd.exe");
+    ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE");
+
+    RtlInitAnsiString(&Expression, "abc.exe\"");
+    RtlInitAnsiString(&Name, "abc.exe");
+    ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE");
+    RtlInitAnsiString(&Name, "abc.exe.");
+    ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE");
+    RtlInitAnsiString(&Name, "abc.exe.back");
+    ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE");
+    RtlInitAnsiString(&Name, "abc.exes");
+    ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE");
+
+    RtlInitAnsiString(&Expression, "a>c.exe");
+    RtlInitAnsiString(&Name, "abc.exe");
+    ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE");
+    RtlInitAnsiString(&Name, "ac.exe");
+    ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE");
+    RtlInitAnsiString(&Expression, "a>>>exe");
+    RtlInitAnsiString(&Name, "abc.exe");
+    ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE");
+    RtlInitAnsiString(&Name, "ac.exe");
+    ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE");
 }
 
 START_TEST(FsRtlExpression)




More information about the Ros-diffs mailing list