From d858435e44f5252d3a76debe3b7e43be058be01a Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Mon, 26 Sep 2011 05:51:39 +0000 Subject: [PATCH] [KMTEST] Add more tests for FsRtlIs*InExpression() Those are currently failing on ReactOS svn path=/trunk/; revision=53858 --- rostests/kmtests/ntos_fsrtl/FsRtlExpression.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/rostests/kmtests/ntos_fsrtl/FsRtlExpression.c b/rostests/kmtests/ntos_fsrtl/FsRtlExpression.c index ff9a8c8c6ad..5d1b043d78d 100644 --- a/rostests/kmtests/ntos_fsrtl/FsRtlExpression.c +++ b/rostests/kmtests/ntos_fsrtl/FsRtlExpression.c @@ -170,6 +170,15 @@ static VOID FsRtlIsNameInExpressionTest() RtlInitUnicodeString(&Expression, L"*.bmp;*.dib"); RtlInitUnicodeString(&Name, L"winhlp32.exe"); ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE"); + + /* Backtracking tests */ + RtlInitUnicodeString(&Expression, L"*.*.*.*"); + RtlInitUnicodeString(&Name, L"127.0.0.1"); + ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE"); + + RtlInitUnicodeString(&Expression, L"*a*ab*abc"); + RtlInitUnicodeString(&Name, L"aabaabcdadabdabc"); + ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE"); } static VOID FsRtlIsDbcsInExpressionTest() @@ -329,6 +338,15 @@ static VOID FsRtlIsDbcsInExpressionTest() RtlInitAnsiString(&Expression, "*.bmp;*.dib"); RtlInitAnsiString(&Name, "winhlp32.exe"); ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE"); + + /* Backtracking tetss */ + RtlInitAnsiString(&Expression, "*.*.*.*"); + RtlInitAnsiString(&Name, "127.0.0.1"); + ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE"); + + RtlInitAnsiString(&Expression, "*a*ab*abc"); + RtlInitAnsiString(&Name, "aabaabcdadabdabc"); + ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE"); } START_TEST(FsRtlExpression)