From: Szabolcs Nagy Date: Thu, 18 Jun 2015 21:52:25 +0000 (+0000) Subject: fix iconv_open test X-Git-Url: http://nsz.repo.hu/git/?p=libc-test;a=commitdiff_plain;h=4125f7c355822c09bdf6cec543800353a4695d90 fix iconv_open test --- diff --git a/src/functional/iconv_open.c b/src/functional/iconv_open.c index ade3ae6..8f6b285 100644 --- a/src/functional/iconv_open.c +++ b/src/functional/iconv_open.c @@ -12,12 +12,13 @@ int main(void) size_t inlen = strlen(inbuf); size_t outlen; size_t r; + char *bad = "bad-codeset"; - cd = iconv_open("", ""); + cd = iconv_open(bad, bad); if (cd != (iconv_t)-1) - t_error("iconv_open(\"\",\"\") didn't fail\n"); + t_error("iconv_open(\"%s\",\"%s\") didn't fail\n", bad, bad); if (errno != EINVAL) - t_error("iconv_open(\"\",\"\") did not fail with EINVAL, got %s\n", strerror(errno)); + t_error("iconv_open(\"%s\",\"%s\") did not fail with EINVAL, got %s\n", bad, bad, strerror(errno)); errno = 0; cd = iconv_open("UTF-8", "UTF-8");