From db3012645efc521f46c1efa45cfe179e2e4a33ba Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Thu, 18 Jun 2015 16:14:20 -0600 Subject: [PATCH] Test strsplit behavior with an empty string. --- lib/util/regress/strsplit/strsplit_test.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/util/regress/strsplit/strsplit_test.c b/lib/util/regress/strsplit/strsplit_test.c index 502ba6f6e..ad46fb263 100644 --- a/lib/util/regress/strsplit/strsplit_test.c +++ b/lib/util/regress/strsplit/strsplit_test.c @@ -65,12 +65,15 @@ static const char test3_in[] = "vi -r -R abc\tdef "; static const char *test3_out[] = { "vi", "-r", "-R", "abc", "def", NULL }; static const char test4_in[] = "vi -r -R abc\tdef "; static const char *test4_out[] = { "vi", "-r", "-R", "abc", NULL }; +static const char test5_in[] = ""; +static const char *test5_out[] = { NULL }; static struct strsplit_test test_data[] = { { test1_in, sizeof(test1_in) - 1, test1_out }, { test2_in, sizeof(test2_in) - 1, test2_out }, { test3_in, sizeof(test3_in) - 1, test3_out }, { test4_in, sizeof(test4_in) - 5, test4_out }, + { test5_in, sizeof(test5_in) - 1, test5_out }, { NULL, 0, NULL } }; -- 2.50.1