[KMTEST]
authorPierre Schweitzer <pierre@reactos.org>
Sun, 13 Feb 2011 08:19:16 +0000 (08:19 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Sun, 13 Feb 2011 08:19:16 +0000 (08:19 +0000)
Some more tests to FsRtlIsNameInExpression & FsRtlIsDbcsInExpression. Some are failing.

svn path=/trunk/; revision=50679

rostests/drivers/kmtest/ntos_fsrtl.c

index 6e3a5b3..b23b87a 100644 (file)
@@ -139,6 +139,22 @@ VOID FsRtlIsNameInExpressionTest()
     RtlInitUnicodeString(&Expression, L"*.c.d");
     RtlInitUnicodeString(&Name, L"a.b.c.d");
     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(&Name, L"aa");
+    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) == FALSE, "expected FALSE, got TRUE");
+    RtlInitUnicodeString(&Name, L"aa");
+    ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE");
+    RtlInitUnicodeString(&Name, L"aaa");
+    ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE");
 }
 
 VOID FsRtlIsDbcsInExpressionTest()
@@ -251,6 +267,22 @@ VOID FsRtlIsDbcsInExpressionTest()
     RtlInitAnsiString(&Expression, "*.c.d");
     RtlInitAnsiString(&Name, "a.b.c.d");
     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(&Name, "aa");
+    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) == FALSE, "expected FALSE, got TRUE");
+    RtlInitAnsiString(&Name, "aa");
+    ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE");
+    RtlInitAnsiString(&Name, "aaa");
+    ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE");
 }
 
 /* PUBLIC FUNCTIONS ***********************************************************/