Back to index

glibc  2.9
tst-iconv6.c
Go to the documentation of this file.
00001 /* BZ #2569 */
00002 
00003 #include <iconv.h>
00004 #include <stdio.h>
00005 
00006 static int
00007 do_test (void)
00008 {
00009   iconv_t cd0 = iconv_open ("ISO-8859-7", "UTF-16LE");
00010   if (cd0 == (iconv_t) -1)
00011     {
00012       puts ("first iconv_open failed");
00013       return 1;
00014     }
00015   iconv_t cd1 = iconv_open ("ISO-8859-7", "UTF-16LE");
00016   if (cd1 == (iconv_t) -1)
00017     {
00018       puts ("second iconv_open failed");
00019       return 1;
00020     }
00021   if (iconv_close (cd0) != 0)
00022     {
00023       puts ("first iconv_close failed");
00024       return 1;
00025     }
00026   if (iconv_close (cd1) != 0)
00027     {
00028       puts ("second iconv_close failed");
00029       return 1;
00030     }
00031   return 0;
00032 }
00033 
00034 #define TEST_FUNCTION do_test ()
00035 #include "../test-skeleton.c"