Author: pschweitzer
Date: Sun Dec 12 22:09:35 2010
New Revision: 50018
URL:
http://svn.reactos.org/svn/reactos?rev=50018&view=rev
Log:
[KMTEST]
Added more testcases for FsRtlIsNameInExpression()
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] Sun Dec 12 22:09:35 2010
@@ -32,6 +32,12 @@
VOID FsRtlIsNameInExpressionTest()
{
UNICODE_STRING Expression, Name;
+
+ RtlInitUnicodeString(&Expression, L"*");
+ RtlInitUnicodeString(&Name, L"");
+ 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"ntdll.dll");
RtlInitUnicodeString(&Name, L".");
@@ -112,6 +118,23 @@
ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE,
"expected TRUE, got FALSE");
RtlInitUnicodeString(&Name, L"SETUP.INI");
ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE,
"expected TRUE, got FALSE");
+
+ RtlInitUnicodeString(&Expression, L"\"ntoskrnl.exe");
+ RtlInitUnicodeString(&Name, L"ntoskrnl.exe");
+ ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE,
"expected FALSE, got TRUE");
+ RtlInitUnicodeString(&Expression, L"ntoskrnl\"exe");
+ ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE,
"expected TRUE, got FALSE");
+ RtlInitUnicodeString(&Expression, L"ntoskrn\".exe");
+ ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE,
"expected FALSE, got TRUE");
+ RtlInitUnicodeString(&Expression, L"ntoskrn\"\"exe");
+ ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE,
"expected FALSE, got TRUE");
+ RtlInitUnicodeString(&Expression, L"ntoskrnl.\"exe");
+ ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE,
"expected FALSE, got TRUE");
+ RtlInitUnicodeString(&Expression, L"ntoskrnl.exe\"");
+ RtlInitUnicodeString(&Name, L"ntoskrnl.exe");
+ ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE,
"expected TRUE, got FALSE");
+ RtlInitUnicodeString(&Name, L"ntoskrnl.exe.");
+ ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE,
"expected TRUE, got FALSE");
}
/* PUBLIC FUNCTIONS ***********************************************************/