1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

util:test: test_ms_fn_match_protocol_no_wildcard: allow -1

We have changed strcasecmp_m() to return -1 in a place where it used
to return -3. This upset a test, but it shouldn't have: the exact
value of the negative int is not guaranteed by the function.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15625

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Douglas Bagnall 2024-04-04 17:23:15 +13:00 committed by Andrew Bartlett
parent f788a39999
commit d4ce8231f9
2 changed files with 1 additions and 2 deletions

View File

@ -36,7 +36,7 @@ static void test_ms_fn_match_protocol_no_wildcard(void **state)
/* no wildcards in pattern, a simple strcasecmp_m */
cmp = ms_fnmatch_protocol("pattern", "string", PROTOCOL_COREPLUS,
true); /* case sensitive */
assert_int_equal(cmp, -3);
assert_true(cmp < 0);
}
static void test_ms_fn_match_protocol_pattern_upgraded(void **state)

View File

@ -1 +0,0 @@
^samba.unittests.ms_fnmatch.test_ms_fn_match_protocol_no_wildcard