Lines Matching defs:words
50 array_size(const char *words[])
56 for (word = words; *word != NULL; word++)
64 check_split(const char *str, const char *delim, const char *words[])
73 printf("Expecting %zd words\n", array_size(words));
74 ATF_CHECK_EQ(atf_list_size(&list), array_size(words));
76 for (word = words, i = 0; *word != NULL; word++, i++) {
77 printf("Word at position %zd should be '%s'\n", i, words[i]);
78 ATF_CHECK_STREQ((const char *)atf_list_index_c(&list, i), words[i]);
238 const char *words[] = { NULL };
239 check_split("", " ", words);
243 const char *words[] = { NULL };
244 check_split(" ", " ", words);
248 const char *words[] = { NULL };
249 check_split(" ", " ", words);
253 const char *words[] = { "a", "b", NULL };
254 check_split("a b", " ", words);
258 const char *words[] = { "a", "b", "c", "d", NULL };
259 check_split("a b c d", " ", words);
263 const char *words[] = { "foo", "bar", NULL };
264 check_split("foo bar", " ", words);
268 const char *words[] = { "foo", "bar", "baz", "foobar", NULL };
269 check_split("foo bar baz foobar", " ", words);
273 const char *words[] = { "foo", "bar", NULL };
274 check_split(" foo bar", " ", words);
278 const char *words[] = { "foo", "bar", NULL };
279 check_split("foo bar", " ", words);
283 const char *words[] = { "foo", "bar", NULL };
284 check_split("foo bar ", " ", words);
288 const char *words[] = { "foo", "bar", NULL };
289 check_split(" foo bar ", " ", words);
303 const char *words[] = { NULL };
304 check_split("", "/", words);
308 const char *words[] = { " ", NULL };
309 check_split(" ", "/", words);
313 const char *words[] = { " ", NULL };
314 check_split(" ", "/", words);
318 const char *words[] = { "a", "b", NULL };
319 check_split("a/b", "/", words);
323 const char *words[] = { "a", "bcd", "ef", NULL };
324 check_split("aLONGDELIMbcdLONGDELIMef", "LONGDELIM", words);