libbb: another unit test for is_suffixed_with
authorTito Ragusa <farmatito@tiscali.it>
Tue, 15 Sep 2015 21:38:01 +0000 (23:38 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Tue, 15 Sep 2015 21:38:01 +0000 (23:38 +0200)
Suggested by Bartosz Golaszewski.

Signed-off-by: Tito Ragusa <farmatito@tiscali.it>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
libbb/compare_string_array.c

index 3dbd3eb1af5b2be47187d01efb2e77c966f3ad2a..2f51237a33301fadb9523707c4a23ea4dbf44710 100644 (file)
@@ -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"));