From: Tito Ragusa Date: Tue, 15 Sep 2015 21:38:01 +0000 (+0200) Subject: libbb: another unit test for is_suffixed_with X-Git-Tag: 1_24_0~47 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f085344d5c4de46d0ef3e15a97ef444fd7cc3194;p=oweals%2Fbusybox.git libbb: another unit test for is_suffixed_with Suggested by Bartosz Golaszewski. Signed-off-by: Tito Ragusa Signed-off-by: Denys Vlasenko --- diff --git a/libbb/compare_string_array.c b/libbb/compare_string_array.c index 3dbd3eb1a..2f51237a3 100644 --- a/libbb/compare_string_array.c +++ b/libbb/compare_string_array.c @@ -159,6 +159,7 @@ BBUNIT_DEFINE_TEST(is_suffixed_with) BBUNIT_ASSERT_STREQ("foo", is_suffixed_with("foo", "foo")); BBUNIT_ASSERT_STREQ("", is_suffixed_with("foo", "")); BBUNIT_ASSERT_STREQ("", is_suffixed_with("", "")); + BBUNIT_ASSERT_STREQ("foo", is_suffixed_with("barfoofoo", "foo")); BBUNIT_ASSERT_NULL(is_suffixed_with("foo", "bar foo")); BBUNIT_ASSERT_NULL(is_suffixed_with("foo foo", "bar"));