From de5ef0c81d2ad266ba914b15a9cb5aca5f5a93fd Mon Sep 17 00:00:00 2001 From: Bill Zissimopoulos Date: Thu, 26 Jan 2017 22:58:49 -0800 Subject: [PATCH] tst: winfsp-tests: --case-insensitive-cmp --- tst/winfsp-tests/winfsp-tests.c | 9 ++++++++- tst/winfsp-tests/winfsp-tests.h | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/tst/winfsp-tests/winfsp-tests.c b/tst/winfsp-tests/winfsp-tests.c index 5f0211f5..c89ab10f 100644 --- a/tst/winfsp-tests/winfsp-tests.c +++ b/tst/winfsp-tests/winfsp-tests.c @@ -29,6 +29,7 @@ int WinFspDiskTests = 1; int WinFspNetTests = 1; BOOLEAN OptResilient = FALSE; +BOOLEAN OptCaseInsensitiveCmp = FALSE; BOOLEAN OptCaseInsensitive = FALSE; BOOLEAN OptCaseRandomize = FALSE; WCHAR OptOplock = 0; @@ -53,7 +54,7 @@ int mywcscmp(PWSTR a, int alen, PWSTR b, int blen) len = alen < blen ? alen : blen; /* we should still be in the C locale */ - if (OptCaseRandomize) + if (OptCaseInsensitiveCmp) res = _wcsnicmp(a, b, len); else res = wcsncmp(a, b, len); @@ -218,6 +219,11 @@ int main(int argc, char *argv[]) OptResilient = TRUE; rmarg(argv, argc, argi); } + else if (0 == strcmp("--case-insensitive-cmp", a)) + { + OptCaseInsensitiveCmp = TRUE; + rmarg(argv, argc, argi); + } else if (0 == strcmp("--case-insensitive", a)) { OptCaseInsensitive = TRUE; @@ -227,6 +233,7 @@ int main(int argc, char *argv[]) { OptCaseRandomize = TRUE; OptCaseInsensitive = TRUE; + OptCaseInsensitiveCmp = TRUE; rmarg(argv, argc, argi); } else if (0 == strcmp("--oplock=batch", a)) diff --git a/tst/winfsp-tests/winfsp-tests.h b/tst/winfsp-tests/winfsp-tests.h index c89cdd38..fe5e1ad9 100644 --- a/tst/winfsp-tests/winfsp-tests.h +++ b/tst/winfsp-tests/winfsp-tests.h @@ -138,6 +138,7 @@ extern int WinFspDiskTests; extern int WinFspNetTests; extern BOOLEAN OptResilient; +extern BOOLEAN OptCaseInsensitiveCmp; extern BOOLEAN OptCaseInsensitive; extern BOOLEAN OptCaseRandomize; extern WCHAR OptOplock;