diff --git a/rostests/drivers/kmtest/ntos_fsrtl.c b/rostests/drivers/kmtest/ntos_fsrtl.c index 2f9c29f37d8..f0aea30d276 100644 --- a/rostests/drivers/kmtest/ntos_fsrtl.c +++ b/rostests/drivers/kmtest/ntos_fsrtl.c @@ -33,6 +33,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"."); 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"); 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 ***********************************************************/