summaryrefslogtreecommitdiff
path: root/tests/test-iconv.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-03-27 21:41:36 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-03-27 21:41:36 +0200
commit6b73edd95d603e27d55d4905134ac1327d426534 (patch)
treee0b9334e2637f17696c796ac13b2c39294bf9233 /tests/test-iconv.c
parent0250cb64565a7d5238bbc751225d4b0236ef8316 (diff)
New upstream version 0.9.7upstream/0.9.7
Diffstat (limited to 'tests/test-iconv.c')
-rw-r--r--tests/test-iconv.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/tests/test-iconv.c b/tests/test-iconv.c
index ed715bda..e58d460c 100644
--- a/tests/test-iconv.c
+++ b/tests/test-iconv.c
@@ -1,5 +1,5 @@
/* Test of character set conversion.
- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 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
@@ -44,8 +44,14 @@ main ()
#if HAVE_ICONV
/* Assume that iconv() supports at least the encodings ASCII, ISO-8859-1,
and UTF-8. */
- iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
- iconv_t cd_utf8_to_88591 = iconv_open ("ISO-8859-1", "UTF-8");
+ iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO8859-1");
+ iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
+
+#if defined __MVS__ && defined __IBMC__
+ /* String literals below are in ASCII, not EBCDIC. */
+# pragma convert("ISO8859-1")
+# define CONVERT_ENABLED
+#endif
ASSERT (cd_88591_to_utf8 != (iconv_t)(-1));
ASSERT (cd_utf8_to_88591 != (iconv_t)(-1));
@@ -142,7 +148,12 @@ main ()
iconv_close (cd_88591_to_utf8);
iconv_close (cd_utf8_to_88591);
+
+#ifdef CONVERT_ENABLED
+# pragma convert(pop)
#endif
+#endif /* HAVE_ICONV */
+
return 0;
}