diff options
author | Bruno Haible <bruno@clisp.org> | 2009-04-06 01:32:32 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-04-06 01:32:32 +0200 |
commit | d763bfdbfb2fc0e3e9057274618c3ec4afda1f1b (patch) | |
tree | d50a3ac3f2d7fa2da809d129a11d045d9988b46d | |
parent | 0cffecb8942f5b721bce2b5ec3ffddd9d3523d2d (diff) | |
download | gnulib-d763bfdbfb2fc0e3e9057274618c3ec4afda1f1b.tar.gz |
Avoid test failure with libiconv-1.13.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | tests/test-striconveh.c | 20 |
2 files changed, 21 insertions, 5 deletions
@@ -1,5 +1,11 @@ 2009-04-05 Bruno Haible <bruno@clisp.org> + Avoid test failure with libiconv-1.13. + * tests/test-striconveh.c (main): Allow result of libiconv 1.13 as one + of the expected test results. + +2009-04-05 Bruno Haible <bruno@clisp.org> + * gnulib-tool (func_emit_lib_Makefile_am): Don't add the library to noinst_LTLIBRARIES if the Makefile.am in the same directory specifies that it should be installed. diff --git a/tests/test-striconveh.c b/tests/test-striconveh.c index 0f9e22a52a..16a16f464e 100644 --- a/tests/test-striconveh.c +++ b/tests/test-striconveh.c @@ -1,5 +1,5 @@ /* Test of character set conversion with error handling. - Copyright (C) 2007-2008 Free Software Foundation, Inc. + Copyright (C) 2007-2009 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 @@ -392,15 +392,25 @@ main () case iconveh_question_mark: case iconveh_escape_sequence: { - static const char expected1[] = "?????"; /* glibc */ - static const char expected2[] = "?2D/YQNhB"; /* libiconv */ + /* glibc result */ + static const char expected1[] = "?????"; + /* libiconv <= 1.12 result */ + static const char expected2[] = "?2D/YQNhB"; + /* libiconv behaviour changed in version 1.13: the result is + '?' U+0FF6 U+1036; this is U+D83F U+D840 U+D841 shifted left + by 6 bits. */ + static const char expected3[] = "?\340\277\266\341\200\266"; ASSERT (retval == 0); - ASSERT (length == strlen (expected1) || length == strlen (expected2)); + ASSERT (length == strlen (expected1) + || length == strlen (expected2) + || length == strlen (expected3)); ASSERT (result != NULL); if (length == strlen (expected1)) ASSERT (memcmp (result, expected1, strlen (expected1)) == 0); - else + else if (length == strlen (expected2)) ASSERT (memcmp (result, expected2, strlen (expected2)) == 0); + else + ASSERT (memcmp (result, expected3, strlen (expected3)) == 0); free (result); } break; |