projects
/
gnulib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1036a1c
)
Avoid test failures on OSF/1, IRIX, HP-UX, AIX.
author
Bruno Haible
<bruno@clisp.org>
Thu, 29 Mar 2007 23:05:45 +0000
(23:05 +0000)
committer
Bruno Haible
<bruno@clisp.org>
Thu, 29 Mar 2007 23:05:45 +0000
(23:05 +0000)
tests/test-striconveh.c
patch
|
blob
|
history
tests/test-striconveha.c
patch
|
blob
|
history
tests/uniconv/test-u16-conv-from-enc.c
patch
|
blob
|
history
tests/uniconv/test-u16-strconv-from-enc.c
patch
|
blob
|
history
tests/uniconv/test-u32-conv-from-enc.c
patch
|
blob
|
history
tests/uniconv/test-u32-strconv-from-enc.c
patch
|
blob
|
history
tests/uniconv/test-u8-conv-from-enc.c
patch
|
blob
|
history
tests/uniconv/test-u8-strconv-from-enc.c
patch
|
blob
|
history
diff --git
a/tests/test-striconveh.c
b/tests/test-striconveh.c
index
31b7b72
..
bb72662
100644
(file)
--- a/
tests/test-striconveh.c
+++ b/
tests/test-striconveh.c
@@
-64,8
+64,6
@@
main ()
iconv_t cd_88592_to_utf8 = iconv_open ("UTF-8", "ISO-8859-2");
iconv_t cd_utf8_to_88592 = iconv_open ("ISO-8859-2", "UTF-8");
iconv_t cd_88592_to_utf8 = iconv_open ("UTF-8", "ISO-8859-2");
iconv_t cd_utf8_to_88592 = iconv_open ("ISO-8859-2", "UTF-8");
- ASSERT (cd_88591_to_88592 != (iconv_t)(-1));
- ASSERT (cd_88592_to_88591 != (iconv_t)(-1));
ASSERT (cd_88591_to_utf8 != (iconv_t)(-1));
ASSERT (cd_utf8_to_88591 != (iconv_t)(-1));
ASSERT (cd_88592_to_utf8 != (iconv_t)(-1));
ASSERT (cd_88591_to_utf8 != (iconv_t)(-1));
ASSERT (cd_utf8_to_88591 != (iconv_t)(-1));
ASSERT (cd_88592_to_utf8 != (iconv_t)(-1));
@@
-457,8
+455,10
@@
main ()
free (result);
}
free (result);
}
- iconv_close (cd_88591_to_88592);
- iconv_close (cd_88592_to_88591);
+ if (cd_88591_to_88592 != (iconv_t)(-1))
+ iconv_close (cd_88591_to_88592);
+ if (cd_88592_to_88591 != (iconv_t)(-1))
+ iconv_close (cd_88592_to_88591);
iconv_close (cd_88591_to_utf8);
iconv_close (cd_utf8_to_88591);
iconv_close (cd_88592_to_utf8);
iconv_close (cd_88591_to_utf8);
iconv_close (cd_utf8_to_88591);
iconv_close (cd_88592_to_utf8);
diff --git
a/tests/test-striconveha.c
b/tests/test-striconveha.c
index
f105161
..
6717856
100644
(file)
--- a/
tests/test-striconveha.c
+++ b/
tests/test-striconveha.c
@@
-311,6
+311,8
@@
main ()
}
}
}
}
+ /* autodetect_jp is only supported when iconv() support ISO-2022-JP-2. */
+# if defined _LIBICONV_VERSION || !(defined _AIX || defined __sgi || defined __hpux || defined __osf__)
/* Test conversions from autodetect_jp to UTF-8. */
for (h = 0; h < SIZEOF (handlers); h++)
{
/* Test conversions from autodetect_jp to UTF-8. */
for (h = 0; h < SIZEOF (handlers); h++)
{
@@
-402,6
+404,7
@@
main ()
free (result);
}
}
free (result);
}
}
+# endif
# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 || _LIBICONV_VERSION >= 0x0105
/* Test conversion from UTF-8 to ISO-8859-1 with transliteration. */
# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 || _LIBICONV_VERSION >= 0x0105
/* Test conversion from UTF-8 to ISO-8859-1 with transliteration. */
diff --git
a/tests/uniconv/test-u16-conv-from-enc.c
b/tests/uniconv/test-u16-conv-from-enc.c
index
6528726
..
506af0e
100644
(file)
--- a/
tests/uniconv/test-u16-conv-from-enc.c
+++ b/
tests/uniconv/test-u16-conv-from-enc.c
@@
-122,6
+122,8
@@
main ()
}
}
}
}
+ /* autodetect_jp is only supported when iconv() support ISO-2022-JP-2. */
+# if defined _LIBICONV_VERSION || !(defined _AIX || defined __sgi || defined __hpux || defined __osf__)
/* Test conversions from autodetect_jp to UTF-16. */
for (h = 0; h < SIZEOF (handlers); h++)
{
/* Test conversions from autodetect_jp to UTF-16. */
for (h = 0; h < SIZEOF (handlers); h++)
{
@@
-219,6
+221,7
@@
main ()
free (result);
}
}
free (result);
}
}
+# endif
#endif
#endif
diff --git
a/tests/uniconv/test-u16-strconv-from-enc.c
b/tests/uniconv/test-u16-strconv-from-enc.c
index
a4be00c
..
ea805d6
100644
(file)
--- a/
tests/uniconv/test-u16-strconv-from-enc.c
+++ b/
tests/uniconv/test-u16-strconv-from-enc.c
@@
-74,6
+74,8
@@
main ()
free (result);
}
free (result);
}
+ /* autodetect_jp is only supported when iconv() support ISO-2022-JP-2. */
+# if defined _LIBICONV_VERSION || !(defined _AIX || defined __sgi || defined __hpux || defined __osf__)
/* Test conversions from autodetect_jp to UTF-16. */
for (h = 0; h < SIZEOF (handlers); h++)
{
/* Test conversions from autodetect_jp to UTF-16. */
for (h = 0; h < SIZEOF (handlers); h++)
{
@@
-114,6
+116,7
@@
main ()
ASSERT (u16_strcmp (result, expected) == 0);
free (result);
}
ASSERT (u16_strcmp (result, expected) == 0);
free (result);
}
+# endif
#endif
#endif
diff --git
a/tests/uniconv/test-u32-conv-from-enc.c
b/tests/uniconv/test-u32-conv-from-enc.c
index
4ca4f1a
..
3226767
100644
(file)
--- a/
tests/uniconv/test-u32-conv-from-enc.c
+++ b/
tests/uniconv/test-u32-conv-from-enc.c
@@
-122,6
+122,8
@@
main ()
}
}
}
}
+ /* autodetect_jp is only supported when iconv() support ISO-2022-JP-2. */
+# if defined _LIBICONV_VERSION || !(defined _AIX || defined __sgi || defined __hpux || defined __osf__)
/* Test conversions from autodetect_jp to UTF-16. */
for (h = 0; h < SIZEOF (handlers); h++)
{
/* Test conversions from autodetect_jp to UTF-16. */
for (h = 0; h < SIZEOF (handlers); h++)
{
@@
-219,6
+221,7
@@
main ()
free (result);
}
}
free (result);
}
}
+# endif
#endif
#endif
diff --git
a/tests/uniconv/test-u32-strconv-from-enc.c
b/tests/uniconv/test-u32-strconv-from-enc.c
index
ab648cb
..
ab8b86c
100644
(file)
--- a/
tests/uniconv/test-u32-strconv-from-enc.c
+++ b/
tests/uniconv/test-u32-strconv-from-enc.c
@@
-74,6
+74,8
@@
main ()
free (result);
}
free (result);
}
+ /* autodetect_jp is only supported when iconv() support ISO-2022-JP-2. */
+# if defined _LIBICONV_VERSION || !(defined _AIX || defined __sgi || defined __hpux || defined __osf__)
/* Test conversions from autodetect_jp to UTF-16. */
for (h = 0; h < SIZEOF (handlers); h++)
{
/* Test conversions from autodetect_jp to UTF-16. */
for (h = 0; h < SIZEOF (handlers); h++)
{
@@
-114,6
+116,7
@@
main ()
ASSERT (u32_strcmp (result, expected) == 0);
free (result);
}
ASSERT (u32_strcmp (result, expected) == 0);
free (result);
}
+# endif
#endif
#endif
diff --git
a/tests/uniconv/test-u8-conv-from-enc.c
b/tests/uniconv/test-u8-conv-from-enc.c
index
69e44d5
..
e74bc58
100644
(file)
--- a/
tests/uniconv/test-u8-conv-from-enc.c
+++ b/
tests/uniconv/test-u8-conv-from-enc.c
@@
-117,6
+117,8
@@
main ()
}
}
}
}
+ /* autodetect_jp is only supported when iconv() support ISO-2022-JP-2. */
+# if defined _LIBICONV_VERSION || !(defined _AIX || defined __sgi || defined __hpux || defined __osf__)
/* Test conversions from autodetect_jp to UTF-8. */
for (h = 0; h < SIZEOF (handlers); h++)
{
/* Test conversions from autodetect_jp to UTF-8. */
for (h = 0; h < SIZEOF (handlers); h++)
{
@@
-205,6
+207,7
@@
main ()
free (result);
}
}
free (result);
}
}
+# endif
#endif
#endif
diff --git
a/tests/uniconv/test-u8-strconv-from-enc.c
b/tests/uniconv/test-u8-strconv-from-enc.c
index
6193bfa
..
2d64099
100644
(file)
--- a/
tests/uniconv/test-u8-strconv-from-enc.c
+++ b/
tests/uniconv/test-u8-strconv-from-enc.c
@@
-65,6
+65,8
@@
main ()
free (result);
}
free (result);
}
+ /* autodetect_jp is only supported when iconv() support ISO-2022-JP-2. */
+# if defined _LIBICONV_VERSION || !(defined _AIX || defined __sgi || defined __hpux || defined __osf__)
/* Test conversions from autodetect_jp to UTF-8. */
for (h = 0; h < SIZEOF (handlers); h++)
{
/* Test conversions from autodetect_jp to UTF-8. */
for (h = 0; h < SIZEOF (handlers); h++)
{
@@
-96,6
+98,7
@@
main ()
ASSERT (u8_strcmp (result, expected) == 0);
free (result);
}
ASSERT (u8_strcmp (result, expected) == 0);
free (result);
}
+# endif
#endif
#endif