mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 16:33:02 -05:00
tst: winfsp-tests: --case-insensitive-cmp
This commit is contained in:
parent
7288605f65
commit
de5ef0c81d
@ -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))
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user