diff options
author | Owen Taylor <otaylor@redhat.com> | 2001-08-24 15:27:23 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2001-08-24 15:27:23 +0000 |
commit | 78f3f18c46e44823a61c618ae91aed4b427014ec (patch) | |
tree | b0cc2115339c2da86a8e6e37dda5ebb8cf3e8387 /tests | |
parent | faca80d619fb89332d25d32369c80026ef37ac2f (diff) |
Patch from Darin Adler to restore Glib-1.2 handling of empty strings, and
Fri Aug 24 11:15:46 2001 Owen Taylor <otaylor@redhat.com>
* glib/gstrfuncs.c docs/Changes-2.0.txt: Patch from Darin
Adler to restore Glib-1.2 handling of empty strings,
and to fix off-by-one with @max_tokens. (#57663).
Doc improvements.
* tests/strfunc-test.c: Change tests to correspond to
new behavior of g_strsplit().
Diffstat (limited to 'tests')
-rw-r--r-- | tests/strfunc-test.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/strfunc-test.c b/tests/strfunc-test.c index dc6ac3aac..9255233cf 100644 --- a/tests/strfunc-test.c +++ b/tests/strfunc-test.c @@ -145,7 +145,7 @@ main (int argc, TEST (NULL, strcmp (g_strrstr_len ("FooBarFooBarFoo", 14, "BarFoo"), "BarFooBarFoo") == 0); - TEST (NULL, strv_check (g_strsplit ("", ",", 0), "", NULL)); + TEST (NULL, strv_check (g_strsplit ("", ",", 0), NULL)); TEST (NULL, strv_check (g_strsplit ("x", ",", 0), "x", NULL)); TEST (NULL, strv_check (g_strsplit ("x,y", ",", 0), "x", "y", NULL)); TEST (NULL, strv_check (g_strsplit ("x,y,", ",", 0), "x", "y", "", NULL)); @@ -158,18 +158,18 @@ main (int argc, TEST (NULL, strv_check (g_strsplit (",,x,,y,,z,,", ",", 0), "", "", "x", "", "y", "", "z", "", "", NULL)); TEST (NULL, strv_check (g_strsplit (",,x,,y,,z,,", ",,", 0), "", "x", "y", "z", "", NULL)); - TEST (NULL, strv_check (g_strsplit ("", ",", 2), "", NULL)); + TEST (NULL, strv_check (g_strsplit ("", ",", 2), NULL)); TEST (NULL, strv_check (g_strsplit ("x", ",", 2), "x", NULL)); TEST (NULL, strv_check (g_strsplit ("x,y", ",", 2), "x", "y", NULL)); - TEST (NULL, strv_check (g_strsplit ("x,y,", ",", 2), "x", "y", "", NULL)); - TEST (NULL, strv_check (g_strsplit (",x,y", ",", 2), "", "x", "y", NULL)); - TEST (NULL, strv_check (g_strsplit (",x,y,", ",", 2), "", "x", "y,", NULL)); - TEST (NULL, strv_check (g_strsplit ("x,y,z", ",", 2), "x", "y", "z", NULL)); - TEST (NULL, strv_check (g_strsplit ("x,y,z,", ",", 2), "x", "y", "z,", NULL)); - TEST (NULL, strv_check (g_strsplit (",x,y,z", ",", 2), "", "x", "y,z", NULL)); - TEST (NULL, strv_check (g_strsplit (",x,y,z,", ",", 2), "", "x", "y,z,", NULL)); - TEST (NULL, strv_check (g_strsplit (",,x,,y,,z,,", ",", 2), "", "", "x,,y,,z,,", NULL)); - TEST (NULL, strv_check (g_strsplit (",,x,,y,,z,,", ",,", 2), "", "x", "y,,z,,", NULL)); + TEST (NULL, strv_check (g_strsplit ("x,y,", ",", 2), "x", "y,", NULL)); + TEST (NULL, strv_check (g_strsplit (",x,y", ",", 2), "", "x,y", NULL)); + TEST (NULL, strv_check (g_strsplit (",x,y,", ",", 2), "", "x,y,", NULL)); + TEST (NULL, strv_check (g_strsplit ("x,y,z", ",", 2), "x", "y,z", NULL)); + TEST (NULL, strv_check (g_strsplit ("x,y,z,", ",", 2), "x", "y,z,", NULL)); + TEST (NULL, strv_check (g_strsplit (",x,y,z", ",", 2), "", "x,y,z", NULL)); + TEST (NULL, strv_check (g_strsplit (",x,y,z,", ",", 2), "", "x,y,z,", NULL)); + TEST (NULL, strv_check (g_strsplit (",,x,,y,,z,,", ",", 2), "", ",x,,y,,z,,", NULL)); + TEST (NULL, strv_check (g_strsplit (",,x,,y,,z,,", ",,", 2), "", "x,,y,,z,,", NULL)); g_print ("\n"); |