summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2001-07-07 02:42:49 +0000
committerOwen Taylor <otaylor@src.gnome.org>2001-07-07 02:42:49 +0000
commitf1f680b68c946a2d2f6af3c942ce1b4c034f1702 (patch)
tree5a80da9edc7b4a8db868706c2ee2a44dd8bd8f9e /tests
parent33e1075b222c6bfc79b1a3b23105e53a95e8fff6 (diff)
Add length arguments to g_utf8_{strup,strdown,casefold,collate_key}.
Fri Jul 6 22:34:32 2001 Owen Taylor <otaylor@redhat.com> * glib/gunicode.h glib/gunidecomp.c glib/guniprop.c glib/gunicollate.c: Add length arguments to g_utf8_{strup,strdown,casefold,collate_key}. * glib/gdate.c: Fix for above.
Diffstat (limited to 'tests')
-rw-r--r--tests/unicode-caseconv.c6
-rw-r--r--tests/unicode-collate.c4
-rw-r--r--tests/unicode-normalize.c6
3 files changed, 8 insertions, 8 deletions
diff --git a/tests/unicode-caseconv.c b/tests/unicode-caseconv.c
index 6b65a7005..65836e142 100644
--- a/tests/unicode-caseconv.c
+++ b/tests/unicode-caseconv.c
@@ -54,7 +54,7 @@ int main (int argc, char **argv)
test = strings[1];
- convert = g_utf8_strup (test);
+ convert = g_utf8_strup (test, -1);
if (strcmp (convert, strings[4]) != 0)
{
fprintf (stderr, "Failure: toupper(%s) == %s, should have been %s\n",
@@ -63,7 +63,7 @@ int main (int argc, char **argv)
}
g_free (convert);
- convert = g_utf8_strdown (test);
+ convert = g_utf8_strdown (test, -1);
if (strcmp (convert, strings[2]) != 0)
{
fprintf (stderr, "Failure: tolower(%s) == %s, should have been %s\n",
@@ -98,7 +98,7 @@ int main (int argc, char **argv)
test = strings[0];
- convert = g_utf8_casefold (test);
+ convert = g_utf8_casefold (test, -1);
if (strcmp (convert, strings[1]) != 0)
{
fprintf (stderr, "Failure: casefold(%s) == '%s', should have been '%s'\n",
diff --git a/tests/unicode-collate.c b/tests/unicode-collate.c
index 44cedb584..0ed2735de 100644
--- a/tests/unicode-collate.c
+++ b/tests/unicode-collate.c
@@ -41,7 +41,7 @@ int main (int argc, char **argv)
if (argc == 2)
{
- in = g_io_channel_new_file (argv[1], G_IO_FILE_MODE_READ, &error);
+ in = g_io_channel_new_file (argv[1], "r", &error);
if (!in)
{
fprintf (stderr, "Cannot open %s: %s\n", argv[1], error->message);
@@ -64,7 +64,7 @@ int main (int argc, char **argv)
str[term_pos] = '\0';
- line.key = g_utf8_collate_key (str);
+ line.key = g_utf8_collate_key (str, -1);
line.str = str;
g_array_append_val (line_array, line);
diff --git a/tests/unicode-normalize.c b/tests/unicode-normalize.c
index 0bd80df34..da6c3336d 100644
--- a/tests/unicode-normalize.c
+++ b/tests/unicode-normalize.c
@@ -67,7 +67,7 @@ test_form (int line,
{
for (i = 0; i < 3; i++)
{
- char *result = g_utf8_normalize (c[i], mode);
+ char *result = g_utf8_normalize (c[i], -1, mode);
if (strcmp (result, c[expected]) != 0)
{
fprintf (stderr, "\nFailure: %d/%d: %s\n", line, i + 1, raw[5]);
@@ -83,7 +83,7 @@ test_form (int line,
{
for (i = 3; i < 5; i++)
{
- char *result = g_utf8_normalize (c[i], mode);
+ char *result = g_utf8_normalize (c[i], -1, mode);
if (strcmp (result, c[expected]) != 0)
{
fprintf (stderr, "\nFailure: %d/%d: %s\n", line, i, raw[5]);
@@ -144,7 +144,7 @@ int main (int argc, char **argv)
if (argc == 3)
line_to_do = atoi(argv[2]);
- in = g_io_channel_new_file (argv[1], G_IO_FILE_MODE_READ, &error);
+ in = g_io_channel_new_file (argv[1], "r", &error);
if (!in)
{
fprintf (stderr, "Cannot open %s: %s\n", argv[1], error->message);