Added more testcases for FsRtlIsNameInExpression()

svn path=/trunk/; revision=50018
This commit is contained in:
Pierre Schweitzer 2010-12-12 22:09:35 +00:00
parent 1632e9c528
commit 94b828f1a4

View file

@ -33,6 +33,12 @@ VOID FsRtlIsNameInExpressionTest()
{ {
UNICODE_STRING Expression, Name; 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(&Expression, L"ntdll.dll");
RtlInitUnicodeString(&Name, L"."); RtlInitUnicodeString(&Name, L".");
ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE"); ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE");
@ -112,6 +118,23 @@ VOID FsRtlIsNameInExpressionTest()
ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE"); ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE");
RtlInitUnicodeString(&Name, L"SETUP.INI"); RtlInitUnicodeString(&Name, L"SETUP.INI");
ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE"); 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 ***********************************************************/ /* PUBLIC FUNCTIONS ***********************************************************/