annotate tests/test-iconv.c @ 40231:9b3c79fdfe0b

strtod: fix clash with strtold Problem reported for RHEL 5 by Jesse Caldwell (Bug#34817). * lib/strtod.c (compute_minus_zero, minus_zero): Simplify by remving the macro / external variable, and having just a function. User changed. This avoids the need for an external variable that might clash.
author Paul Eggert <eggert@cs.ucla.edu>
date Mon, 11 Mar 2019 16:40:29 -0700
parents b06060465f09
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7873
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
1 /* Test of character set conversion.
40057
b06060465f09 maint: Run 'make update-copyright'
Paul Eggert <eggert@cs.ucla.edu>
parents: 19484
diff changeset
2 Copyright (C) 2007-2019 Free Software Foundation, Inc.
7873
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3
9309
bbbbbf4cd1c5 Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents: 8891
diff changeset
4 This program is free software: you can redistribute it and/or modify
7873
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 it under the terms of the GNU General Public License as published by
9309
bbbbbf4cd1c5 Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents: 8891
diff changeset
6 the Free Software Foundation; either version 3 of the License, or
bbbbbf4cd1c5 Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents: 8891
diff changeset
7 (at your option) any later version.
7873
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9 This program is distributed in the hope that it will be useful,
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 GNU General Public License for more details.
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14 You should have received a copy of the GNU General Public License
19190
9759915b2aca all: prefer https: URLs
Paul Eggert <eggert@cs.ucla.edu>
parents: 18626
diff changeset
15 along with this program. If not, see <https://www.gnu.org/licenses/>. */
7873
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
16
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
17 /* Written by Bruno Haible <bruno@clisp.org>, 2007. */
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
18
8891
633babea5f62 Unconditionally include <config.h> in unit tests.
Eric Blake <ebb9@byu.net>
parents: 8754
diff changeset
19 #include <config.h>
7873
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
20
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
21 #if HAVE_ICONV
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
22 # include <iconv.h>
12489
33ab12a7cea2 tests: add signature checks
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
23
33ab12a7cea2 tests: add signature checks
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
24 # ifndef ICONV_CONST
33ab12a7cea2 tests: add signature checks
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
25 # define ICONV_CONST /* empty */
33ab12a7cea2 tests: add signature checks
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
26 # endif
33ab12a7cea2 tests: add signature checks
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
27
33ab12a7cea2 tests: add signature checks
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
28 #include "signature.h"
33ab12a7cea2 tests: add signature checks
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
29 SIGNATURE_CHECK (iconv, size_t, (iconv_t, ICONV_CONST char **, size_t *,
33ab12a7cea2 tests: add signature checks
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
30 char **, size_t *));
33ab12a7cea2 tests: add signature checks
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
31 SIGNATURE_CHECK (iconv_close, int, (iconv_t x));
33ab12a7cea2 tests: add signature checks
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
32 SIGNATURE_CHECK (iconv_open, iconv_t, (char const *, char const *));
33ab12a7cea2 tests: add signature checks
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
33
7873
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
34 #endif
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
35
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
36 #include <errno.h>
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
37 #include <string.h>
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
38
12496
a48d3d749ca5 Refactor common macros used in tests.
Bruno Haible <bruno@clisp.org>
parents: 12489
diff changeset
39 #include "macros.h"
7873
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
40
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
41 int
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
42 main ()
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
43 {
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
44 #if HAVE_ICONV
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
45 /* Assume that iconv() supports at least the encodings ASCII, ISO-8859-1,
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
46 and UTF-8. */
18370
5f84652c6d65 iconv_open-utf-tests, iconv-tests: port to EBCDIC
Daniel Richard G <skunk@iSKUNK.ORG>
parents: 18189
diff changeset
47 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO8859-1");
5f84652c6d65 iconv_open-utf-tests, iconv-tests: port to EBCDIC
Daniel Richard G <skunk@iSKUNK.ORG>
parents: 18189
diff changeset
48 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
5f84652c6d65 iconv_open-utf-tests, iconv-tests: port to EBCDIC
Daniel Richard G <skunk@iSKUNK.ORG>
parents: 18189
diff changeset
49
5f84652c6d65 iconv_open-utf-tests, iconv-tests: port to EBCDIC
Daniel Richard G <skunk@iSKUNK.ORG>
parents: 18189
diff changeset
50 #if defined __MVS__ && defined __IBMC__
5f84652c6d65 iconv_open-utf-tests, iconv-tests: port to EBCDIC
Daniel Richard G <skunk@iSKUNK.ORG>
parents: 18189
diff changeset
51 /* String literals below are in ASCII, not EBCDIC. */
5f84652c6d65 iconv_open-utf-tests, iconv-tests: port to EBCDIC
Daniel Richard G <skunk@iSKUNK.ORG>
parents: 18189
diff changeset
52 # pragma convert("ISO8859-1")
5f84652c6d65 iconv_open-utf-tests, iconv-tests: port to EBCDIC
Daniel Richard G <skunk@iSKUNK.ORG>
parents: 18189
diff changeset
53 # define CONVERT_ENABLED
5f84652c6d65 iconv_open-utf-tests, iconv-tests: port to EBCDIC
Daniel Richard G <skunk@iSKUNK.ORG>
parents: 18189
diff changeset
54 #endif
7873
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
55
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
56 ASSERT (cd_88591_to_utf8 != (iconv_t)(-1));
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
57 ASSERT (cd_utf8_to_88591 != (iconv_t)(-1));
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
58
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
59 /* Test conversion from ISO-8859-1 to UTF-8 with no errors. */
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
60 {
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
61 static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
62 static const char expected[] = "\303\204rger mit b\303\266sen B\303\274bchen ohne Augenma\303\237";
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
63 char buf[50];
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
64 const char *inptr = input;
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
65 size_t inbytesleft = strlen (input);
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
66 char *outptr = buf;
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
67 size_t outbytesleft = sizeof (buf);
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
68 size_t res = iconv (cd_88591_to_utf8,
12421
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 9889
diff changeset
69 (ICONV_CONST char **) &inptr, &inbytesleft,
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 9889
diff changeset
70 &outptr, &outbytesleft);
7873
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
71 ASSERT (res == 0 && inbytesleft == 0);
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
72 ASSERT (outptr == buf + strlen (expected));
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
73 ASSERT (memcmp (buf, expected, strlen (expected)) == 0);
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
74 }
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
75
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
76 /* Test conversion from ISO-8859-1 to UTF-8 with E2BIG. */
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
77 {
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
78 static const char input[] = "\304";
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
79 static char buf[2] = { (char)0xDE, (char)0xAD };
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
80 const char *inptr = input;
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
81 size_t inbytesleft = 1;
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
82 char *outptr = buf;
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
83 size_t outbytesleft = 1;
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
84 size_t res = iconv (cd_88591_to_utf8,
12421
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 9889
diff changeset
85 (ICONV_CONST char **) &inptr, &inbytesleft,
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 9889
diff changeset
86 &outptr, &outbytesleft);
7873
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
87 ASSERT (res == (size_t)(-1) && errno == E2BIG);
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
88 ASSERT (inbytesleft == 1);
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
89 ASSERT (outbytesleft == 1);
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
90 ASSERT ((unsigned char) buf[1] == 0xAD);
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
91 ASSERT ((unsigned char) buf[0] == 0xDE);
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
92 }
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
93
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
94 /* Test conversion from UTF-8 to ISO-8859-1 with no errors. */
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
95 {
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
96 static const char input[] = "\303\204rger mit b\303\266sen B\303\274bchen ohne Augenma\303\237";
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
97 static const char expected[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
98 char buf[50];
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
99 const char *inptr = input;
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
100 size_t inbytesleft = strlen (input);
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
101 char *outptr = buf;
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
102 size_t outbytesleft = sizeof (buf);
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
103 size_t res = iconv (cd_utf8_to_88591,
12421
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 9889
diff changeset
104 (ICONV_CONST char **) &inptr, &inbytesleft,
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 9889
diff changeset
105 &outptr, &outbytesleft);
7873
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
106 ASSERT (res == 0 && inbytesleft == 0);
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
107 ASSERT (outptr == buf + strlen (expected));
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
108 ASSERT (memcmp (buf, expected, strlen (expected)) == 0);
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
109 }
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
110
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
111 /* Test conversion from UTF-8 to ISO-8859-1 with EILSEQ. */
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
112 {
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
113 static const char input[] = "\342\202\254"; /* EURO SIGN */
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
114 char buf[10];
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
115 const char *inptr = input;
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
116 size_t inbytesleft = strlen (input);
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
117 char *outptr = buf;
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
118 size_t outbytesleft = sizeof (buf);
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
119 size_t res = iconv (cd_utf8_to_88591,
12421
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 9889
diff changeset
120 (ICONV_CONST char **) &inptr, &inbytesleft,
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 9889
diff changeset
121 &outptr, &outbytesleft);
7873
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
122 if (res == (size_t)(-1))
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
123 {
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
124 ASSERT (errno == EILSEQ);
12421
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 9889
diff changeset
125 ASSERT (inbytesleft == strlen (input) && outptr == buf);
7873
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
126 }
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
127 else
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
128 {
12421
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 9889
diff changeset
129 ASSERT (res == 1);
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 9889
diff changeset
130 ASSERT (inbytesleft == 0);
7873
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
131 }
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
132 }
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
133
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
134 /* Test conversion from UTF-8 to ISO-8859-1 with EINVAL. */
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
135 {
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
136 static const char input[] = "\342";
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
137 char buf[10];
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
138 const char *inptr = input;
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
139 size_t inbytesleft = 1;
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
140 char *outptr = buf;
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
141 size_t outbytesleft = sizeof (buf);
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
142 size_t res = iconv (cd_utf8_to_88591,
12421
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 9889
diff changeset
143 (ICONV_CONST char **) &inptr, &inbytesleft,
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 9889
diff changeset
144 &outptr, &outbytesleft);
7873
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
145 ASSERT (res == (size_t)(-1) && errno == EINVAL);
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
146 ASSERT (inbytesleft == 1 && outptr == buf);
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
147 }
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
148
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
149 iconv_close (cd_88591_to_utf8);
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
150 iconv_close (cd_utf8_to_88591);
18370
5f84652c6d65 iconv_open-utf-tests, iconv-tests: port to EBCDIC
Daniel Richard G <skunk@iSKUNK.ORG>
parents: 18189
diff changeset
151
5f84652c6d65 iconv_open-utf-tests, iconv-tests: port to EBCDIC
Daniel Richard G <skunk@iSKUNK.ORG>
parents: 18189
diff changeset
152 #ifdef CONVERT_ENABLED
5f84652c6d65 iconv_open-utf-tests, iconv-tests: port to EBCDIC
Daniel Richard G <skunk@iSKUNK.ORG>
parents: 18189
diff changeset
153 # pragma convert(pop)
7873
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
154 #endif
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
155
18370
5f84652c6d65 iconv_open-utf-tests, iconv-tests: port to EBCDIC
Daniel Richard G <skunk@iSKUNK.ORG>
parents: 18189
diff changeset
156 #endif /* HAVE_ICONV */
5f84652c6d65 iconv_open-utf-tests, iconv-tests: port to EBCDIC
Daniel Richard G <skunk@iSKUNK.ORG>
parents: 18189
diff changeset
157
7873
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
158 return 0;
eb473ee59fbc Tests for iconv module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
159 }