summaryrefslogtreecommitdiff
path: root/tests/uniconv
diff options
context:
space:
mode:
Diffstat (limited to 'tests/uniconv')
-rw-r--r--tests/uniconv/test-u16-conv-from-enc.c4
-rw-r--r--tests/uniconv/test-u16-conv-to-enc.c6
-rw-r--r--tests/uniconv/test-u16-strconv-from-enc.c4
-rw-r--r--tests/uniconv/test-u16-strconv-to-enc.c4
-rw-r--r--tests/uniconv/test-u32-conv-from-enc.c4
-rw-r--r--tests/uniconv/test-u32-conv-to-enc.c6
-rw-r--r--tests/uniconv/test-u32-strconv-from-enc.c4
-rw-r--r--tests/uniconv/test-u32-strconv-to-enc.c4
-rw-r--r--tests/uniconv/test-u8-conv-from-enc.c4
-rw-r--r--tests/uniconv/test-u8-conv-to-enc.c6
-rw-r--r--tests/uniconv/test-u8-strconv-from-enc.c4
-rw-r--r--tests/uniconv/test-u8-strconv-to-enc.c4
12 files changed, 30 insertions, 24 deletions
diff --git a/tests/uniconv/test-u16-conv-from-enc.c b/tests/uniconv/test-u16-conv-from-enc.c
index d1d7026..9df9f69 100644
--- a/tests/uniconv/test-u16-conv-from-enc.c
+++ b/tests/uniconv/test-u16-conv-from-enc.c
@@ -1,5 +1,5 @@
/* Test of conversion to UTF-16 from legacy encodings.
- Copyright (C) 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007-2022 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -41,13 +41,13 @@ new_offsets (size_t n)
int
main ()
{
+#if HAVE_ICONV
static enum iconv_ilseq_handler handlers[] =
{ iconveh_error, iconveh_question_mark, iconveh_escape_sequence };
size_t h;
size_t o;
size_t i;
-#if HAVE_ICONV
/* Assume that iconv() supports at least the encodings ASCII, ISO-8859-1,
ISO-8859-2, and UTF-8. */
diff --git a/tests/uniconv/test-u16-conv-to-enc.c b/tests/uniconv/test-u16-conv-to-enc.c
index 8c2f766..779beb6 100644
--- a/tests/uniconv/test-u16-conv-to-enc.c
+++ b/tests/uniconv/test-u16-conv-to-enc.c
@@ -1,5 +1,5 @@
/* Test of conversion from UTF-16 to legacy encodings.
- Copyright (C) 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007-2022 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -40,13 +40,13 @@ new_offsets (size_t n)
int
main ()
{
+#if HAVE_ICONV
static enum iconv_ilseq_handler handlers[] =
{ iconveh_error, iconveh_question_mark, iconveh_escape_sequence };
size_t h;
size_t o;
size_t i;
-#if HAVE_ICONV
/* Assume that iconv() supports at least the encodings ASCII, ISO-8859-1,
ISO-8859-2, and UTF-8. */
@@ -106,6 +106,8 @@ main ()
ASSERT (result == NULL);
ASSERT (errno == EILSEQ);
ASSERT (length == 0xdead);
+ if (o)
+ free (offsets);
break;
case iconveh_question_mark:
{
diff --git a/tests/uniconv/test-u16-strconv-from-enc.c b/tests/uniconv/test-u16-strconv-from-enc.c
index 393634e..9ab2674 100644
--- a/tests/uniconv/test-u16-strconv-from-enc.c
+++ b/tests/uniconv/test-u16-strconv-from-enc.c
@@ -1,5 +1,5 @@
/* Test of conversion to UTF-16 from legacy encodings.
- Copyright (C) 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007-2022 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -29,11 +29,11 @@ extern int iconv_supports_encoding (const char *encoding);
int
main ()
{
+#if HAVE_ICONV
static enum iconv_ilseq_handler handlers[] =
{ iconveh_error, iconveh_question_mark, iconveh_escape_sequence };
size_t h;
-#if HAVE_ICONV
/* Assume that iconv() supports at least the encodings ASCII, ISO-8859-1,
ISO-8859-2, and UTF-8. */
diff --git a/tests/uniconv/test-u16-strconv-to-enc.c b/tests/uniconv/test-u16-strconv-to-enc.c
index cf771ff..d83d92c 100644
--- a/tests/uniconv/test-u16-strconv-to-enc.c
+++ b/tests/uniconv/test-u16-strconv-to-enc.c
@@ -1,5 +1,5 @@
/* Test of conversion from UTF-16 to legacy encodings.
- Copyright (C) 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007-2022 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -29,11 +29,11 @@
int
main ()
{
+#if HAVE_ICONV
static enum iconv_ilseq_handler handlers[] =
{ iconveh_error, iconveh_question_mark, iconveh_escape_sequence };
size_t h;
-#if HAVE_ICONV
/* Assume that iconv() supports at least the encodings ASCII, ISO-8859-1,
ISO-8859-2, and UTF-8. */
diff --git a/tests/uniconv/test-u32-conv-from-enc.c b/tests/uniconv/test-u32-conv-from-enc.c
index 91dda64..e92651a 100644
--- a/tests/uniconv/test-u32-conv-from-enc.c
+++ b/tests/uniconv/test-u32-conv-from-enc.c
@@ -1,5 +1,5 @@
/* Test of conversion to UTF-32 from legacy encodings.
- Copyright (C) 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007-2022 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -41,13 +41,13 @@ new_offsets (size_t n)
int
main ()
{
+#if HAVE_ICONV
static enum iconv_ilseq_handler handlers[] =
{ iconveh_error, iconveh_question_mark, iconveh_escape_sequence };
size_t h;
size_t o;
size_t i;
-#if HAVE_ICONV
/* Assume that iconv() supports at least the encodings ASCII, ISO-8859-1,
ISO-8859-2, and UTF-8. */
diff --git a/tests/uniconv/test-u32-conv-to-enc.c b/tests/uniconv/test-u32-conv-to-enc.c
index f35118f..32d29df 100644
--- a/tests/uniconv/test-u32-conv-to-enc.c
+++ b/tests/uniconv/test-u32-conv-to-enc.c
@@ -1,5 +1,5 @@
/* Test of conversion from UTF-32 to legacy encodings.
- Copyright (C) 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007-2022 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -40,13 +40,13 @@ new_offsets (size_t n)
int
main ()
{
+#if HAVE_ICONV
static enum iconv_ilseq_handler handlers[] =
{ iconveh_error, iconveh_question_mark, iconveh_escape_sequence };
size_t h;
size_t o;
size_t i;
-#if HAVE_ICONV
/* Assume that iconv() supports at least the encodings ASCII, ISO-8859-1,
ISO-8859-2, and UTF-8. */
@@ -106,6 +106,8 @@ main ()
ASSERT (result == NULL);
ASSERT (errno == EILSEQ);
ASSERT (length == 0xdead);
+ if (o)
+ free (offsets);
break;
case iconveh_question_mark:
{
diff --git a/tests/uniconv/test-u32-strconv-from-enc.c b/tests/uniconv/test-u32-strconv-from-enc.c
index 9416610..be22eca 100644
--- a/tests/uniconv/test-u32-strconv-from-enc.c
+++ b/tests/uniconv/test-u32-strconv-from-enc.c
@@ -1,5 +1,5 @@
/* Test of conversion to UTF-32 from legacy encodings.
- Copyright (C) 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007-2022 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -29,11 +29,11 @@ extern int iconv_supports_encoding (const char *encoding);
int
main ()
{
+#if HAVE_ICONV
static enum iconv_ilseq_handler handlers[] =
{ iconveh_error, iconveh_question_mark, iconveh_escape_sequence };
size_t h;
-#if HAVE_ICONV
/* Assume that iconv() supports at least the encodings ASCII, ISO-8859-1,
ISO-8859-2, and UTF-8. */
diff --git a/tests/uniconv/test-u32-strconv-to-enc.c b/tests/uniconv/test-u32-strconv-to-enc.c
index e21aaa7..c871d4b 100644
--- a/tests/uniconv/test-u32-strconv-to-enc.c
+++ b/tests/uniconv/test-u32-strconv-to-enc.c
@@ -1,5 +1,5 @@
/* Test of conversion from UTF-32 to legacy encodings.
- Copyright (C) 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007-2022 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -28,11 +28,11 @@
int
main ()
{
+#if HAVE_ICONV
static enum iconv_ilseq_handler handlers[] =
{ iconveh_error, iconveh_question_mark, iconveh_escape_sequence };
size_t h;
-#if HAVE_ICONV
/* Assume that iconv() supports at least the encodings ASCII, ISO-8859-1,
ISO-8859-2, and UTF-8. */
diff --git a/tests/uniconv/test-u8-conv-from-enc.c b/tests/uniconv/test-u8-conv-from-enc.c
index 6e7e1f2..8e5c252 100644
--- a/tests/uniconv/test-u8-conv-from-enc.c
+++ b/tests/uniconv/test-u8-conv-from-enc.c
@@ -1,5 +1,5 @@
/* Test of conversion to UTF-8 from legacy encodings.
- Copyright (C) 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007-2022 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -41,13 +41,13 @@ new_offsets (size_t n)
int
main ()
{
+#if HAVE_ICONV
static enum iconv_ilseq_handler handlers[] =
{ iconveh_error, iconveh_question_mark, iconveh_escape_sequence };
size_t h;
size_t o;
size_t i;
-#if HAVE_ICONV
/* Assume that iconv() supports at least the encodings ASCII, ISO-8859-1,
ISO-8859-2, and UTF-8. */
diff --git a/tests/uniconv/test-u8-conv-to-enc.c b/tests/uniconv/test-u8-conv-to-enc.c
index fab1a48..3d9d38d 100644
--- a/tests/uniconv/test-u8-conv-to-enc.c
+++ b/tests/uniconv/test-u8-conv-to-enc.c
@@ -1,5 +1,5 @@
/* Test of conversion from UTF-8 to legacy encodings.
- Copyright (C) 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007-2022 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -41,13 +41,13 @@ new_offsets (size_t n)
int
main ()
{
+#if HAVE_ICONV
static enum iconv_ilseq_handler handlers[] =
{ iconveh_error, iconveh_question_mark, iconveh_escape_sequence };
size_t h;
size_t o;
size_t i;
-#if HAVE_ICONV
/* Assume that iconv() supports at least the encodings ASCII, ISO-8859-1,
ISO-8859-2, and UTF-8. */
@@ -106,6 +106,8 @@ main ()
ASSERT (result == NULL);
ASSERT (errno == EILSEQ);
ASSERT (length == 0xdead);
+ if (o)
+ free (offsets);
break;
case iconveh_question_mark:
{
diff --git a/tests/uniconv/test-u8-strconv-from-enc.c b/tests/uniconv/test-u8-strconv-from-enc.c
index 3d032db..daa2753 100644
--- a/tests/uniconv/test-u8-strconv-from-enc.c
+++ b/tests/uniconv/test-u8-strconv-from-enc.c
@@ -1,5 +1,5 @@
/* Test of conversion to UTF-8 from legacy encodings.
- Copyright (C) 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007-2022 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -29,11 +29,11 @@ extern int iconv_supports_encoding (const char *encoding);
int
main ()
{
+#if HAVE_ICONV
static enum iconv_ilseq_handler handlers[] =
{ iconveh_error, iconveh_question_mark, iconveh_escape_sequence };
size_t h;
-#if HAVE_ICONV
/* Assume that iconv() supports at least the encodings ASCII, ISO-8859-1,
ISO-8859-2, and UTF-8. */
diff --git a/tests/uniconv/test-u8-strconv-to-enc.c b/tests/uniconv/test-u8-strconv-to-enc.c
index 00c0f59..689f7cd 100644
--- a/tests/uniconv/test-u8-strconv-to-enc.c
+++ b/tests/uniconv/test-u8-strconv-to-enc.c
@@ -1,5 +1,5 @@
/* Test of conversion from UTF-8 to legacy encodings.
- Copyright (C) 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007-2022 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -29,11 +29,11 @@
int
main ()
{
+#if HAVE_ICONV
static enum iconv_ilseq_handler handlers[] =
{ iconveh_error, iconveh_question_mark, iconveh_escape_sequence };
size_t h;
-#if HAVE_ICONV
/* Assume that iconv() supports at least the encodings ASCII, ISO-8859-1,
ISO-8859-2, and UTF-8. */