projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed debug-like msg.
[yaz-moved-to-github.git]
/
test
/
tsticonv.c
diff --git
a/test/tsticonv.c
b/test/tsticonv.c
index
08394ed
..
20424d6
100644
(file)
--- a/
test/tsticonv.c
+++ b/
test/tsticonv.c
@@
-1,8
+1,6
@@
-/*
- * Copyright (C) 1995-2007, Index Data ApS
+/* This file is part of the YAZ toolkit.
+ * Copyright (C) 1995-2008 Index Data
* See the file LICENSE for details.
* See the file LICENSE for details.
- *
- * $Id: tsticonv.c,v 1.35 2008-03-12 08:53:28 adam Exp $
*/
#if HAVE_CONFIG_H
*/
#if HAVE_CONFIG_H
@@
-94,7
+92,7
@@
static int tst_convert_x(yaz_iconv_t cd, const char *buf, const char *cmpbuf,
{
int ret = 1;
WRBUF b = wrbuf_alloc();
{
int ret = 1;
WRBUF b = wrbuf_alloc();
- char outbuf[12];
+ char outbuf[16];
size_t inbytesleft = strlen(buf);
const char *inp = buf;
int rounds = 0;
size_t inbytesleft = strlen(buf);
const char *inp = buf;
int rounds = 0;
@@
-489,9
+487,9
@@
static void tst_marc8_to_latin1(void)
yaz_iconv_close(cd);
}
yaz_iconv_close(cd);
}
-static void tst_utf8_to_marc8(void)
+static void tst_utf8_to_marc8(const char *marc8_type)
{
{
- yaz_iconv_t cd = yaz_iconv_open("MARC8", "UTF-8");
+ yaz_iconv_t cd = yaz_iconv_open(marc8_type, "UTF-8");
YAZ_CHECK(cd);
if (!cd)
YAZ_CHECK(cd);
if (!cd)
@@
-602,6
+600,7
@@
static void tst_utf8_to_marc8(void)
#endif
YAZ_CHECK(strcmp("\033p0\x1bs", outbuf0) == 0);
}
#endif
YAZ_CHECK(strcmp("\033p0\x1bs", outbuf0) == 0);
}
+ yaz_iconv(cd, 0, 0, 0, 0);
yaz_iconv_close(cd);
}
yaz_iconv_close(cd);
}
@@
-697,7
+696,9
@@
int main (int argc, char **argv)
tst_advance_to_utf8();
tst_utf8_to_advance();
tst_advance_to_utf8();
tst_utf8_to_advance();
- tst_utf8_to_marc8();
+ tst_utf8_to_marc8("marc8");
+ tst_utf8_to_marc8("marc8lossy");
+ tst_utf8_to_marc8("marc8lossless");
tst_latin1_to_marc8();
tst_latin1_to_marc8();