mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-23 00:43:00 -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;
|
int WinFspNetTests = 1;
|
||||||
|
|
||||||
BOOLEAN OptResilient = FALSE;
|
BOOLEAN OptResilient = FALSE;
|
||||||
|
BOOLEAN OptCaseInsensitiveCmp = FALSE;
|
||||||
BOOLEAN OptCaseInsensitive = FALSE;
|
BOOLEAN OptCaseInsensitive = FALSE;
|
||||||
BOOLEAN OptCaseRandomize = FALSE;
|
BOOLEAN OptCaseRandomize = FALSE;
|
||||||
WCHAR OptOplock = 0;
|
WCHAR OptOplock = 0;
|
||||||
@ -53,7 +54,7 @@ int mywcscmp(PWSTR a, int alen, PWSTR b, int blen)
|
|||||||
len = alen < blen ? alen : blen;
|
len = alen < blen ? alen : blen;
|
||||||
|
|
||||||
/* we should still be in the C locale */
|
/* we should still be in the C locale */
|
||||||
if (OptCaseRandomize)
|
if (OptCaseInsensitiveCmp)
|
||||||
res = _wcsnicmp(a, b, len);
|
res = _wcsnicmp(a, b, len);
|
||||||
else
|
else
|
||||||
res = wcsncmp(a, b, len);
|
res = wcsncmp(a, b, len);
|
||||||
@ -218,6 +219,11 @@ int main(int argc, char *argv[])
|
|||||||
OptResilient = TRUE;
|
OptResilient = TRUE;
|
||||||
rmarg(argv, argc, argi);
|
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))
|
else if (0 == strcmp("--case-insensitive", a))
|
||||||
{
|
{
|
||||||
OptCaseInsensitive = TRUE;
|
OptCaseInsensitive = TRUE;
|
||||||
@ -227,6 +233,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
OptCaseRandomize = TRUE;
|
OptCaseRandomize = TRUE;
|
||||||
OptCaseInsensitive = TRUE;
|
OptCaseInsensitive = TRUE;
|
||||||
|
OptCaseInsensitiveCmp = TRUE;
|
||||||
rmarg(argv, argc, argi);
|
rmarg(argv, argc, argi);
|
||||||
}
|
}
|
||||||
else if (0 == strcmp("--oplock=batch", a))
|
else if (0 == strcmp("--oplock=batch", a))
|
||||||
|
@ -138,6 +138,7 @@ extern int WinFspDiskTests;
|
|||||||
extern int WinFspNetTests;
|
extern int WinFspNetTests;
|
||||||
|
|
||||||
extern BOOLEAN OptResilient;
|
extern BOOLEAN OptResilient;
|
||||||
|
extern BOOLEAN OptCaseInsensitiveCmp;
|
||||||
extern BOOLEAN OptCaseInsensitive;
|
extern BOOLEAN OptCaseInsensitive;
|
||||||
extern BOOLEAN OptCaseRandomize;
|
extern BOOLEAN OptCaseRandomize;
|
||||||
extern WCHAR OptOplock;
|
extern WCHAR OptOplock;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user