test: fix litest_assert_str_not_in

Looks like an inadvertent paste or possibly a search regex gone wrong.
And the strstr condition was wrong too.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1276>
This commit is contained in:
Peter Hutterer 2025-07-21 10:04:23 +10:00
parent 013ed167a4
commit 35838e9b2c

View file

@ -304,11 +304,11 @@ litest_fail_comparison_str(const char *file,
_needle, _haystack); \
} while(0)
#define litest_needlessert_str_not_in(needle_, haystack_) \
#define litest_assert_str_not_in(needle_, haystack_) \
do { \
const char *_needle = needle_; \
const char *_haystack = haystack_; \
if (!strstr(_haystack, _needle)) \
if (strstr(_haystack, _needle)) \
litest_fail_comparison_str(__FILE__, __LINE__, __func__,\
"'" #needle_ "' not in: '" #haystack_ "'", \
"not in", \