Fix endless loop with invalid /etc/shells file.
[glibc.git] / iconvdata / tst-iconv6.c
blobaccb21b113d0f047c0cdde7e5839ae3a8ae6d442
1 /* BZ #2569 */
3 #include <iconv.h>
4 #include <stdio.h>
6 static int
7 do_test (void)
9 iconv_t cd0 = iconv_open ("ISO-8859-7", "UTF-16LE");
10 if (cd0 == (iconv_t) -1)
12 puts ("first iconv_open failed");
13 return 1;
15 iconv_t cd1 = iconv_open ("ISO-8859-7", "UTF-16LE");
16 if (cd1 == (iconv_t) -1)
18 puts ("second iconv_open failed");
19 return 1;
21 if (iconv_close (cd0) != 0)
23 puts ("first iconv_close failed");
24 return 1;
26 if (iconv_close (cd1) != 0)
28 puts ("second iconv_close failed");
29 return 1;
31 return 0;
34 #define TEST_FUNCTION do_test ()
35 #include "../test-skeleton.c"