Definition at line 268 of file liblwgeom/cunit/cu_misc.c.
275 memset(olist, 0,
sizeof(olist));
277 strcpy(input,
"key1=value1 key2=value2 ");
282 CU_ASSERT_STRING_EQUAL(
"value1",
value);
284 CU_ASSERT_STRING_EQUAL(
"value2",
value);
286 CU_ASSERT_EQUAL(NULL,
value);
289 CU_ASSERT_EQUAL(4, sz);
291 memset(olist, 0,
sizeof(olist));
295 CU_ASSERT_EQUAL(NULL,
value);
297 memset(olist, 0,
sizeof(olist));
298 strcpy(input,
" key3= ");
301 CU_ASSERT_EQUAL(2, sz);
303 strcpy(input,
" key1=value1 key2='value2 value3' ");
304 memset(olist, 0,
sizeof(olist));
307 CU_ASSERT_EQUAL(2, sz);
308 CU_ASSERT_STRING_EQUAL(
"key1=value1", olist[0]);
309 CU_ASSERT_STRING_EQUAL(
"key2='value2 value3'", olist[1]);
void option_list_gdal_parse(char *input, char **olist)
size_t option_list_length(char **olist)
Returns the total number of keys and values in the list.
const char * option_list_search(char **olist, const char *key)
Returns null if the key cannot be found.
void option_list_parse(char *input, char **olist)
option_list is a null-terminated list of strings, where every odd string is a key and every even stri...
References option_list_gdal_parse(), option_list_length(), option_list_parse(), option_list_search(), OPTION_LIST_SIZE, and genraster::value.
Referenced by misc_suite_setup().