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
test_iconv: make variable local
[yaz-moved-to-github.git]
/
test
/
test_iconv.c
diff --git
a/test/test_iconv.c
b/test/test_iconv.c
index
aacea86
..
4651203
100644
(file)
--- a/
test/test_iconv.c
+++ b/
test/test_iconv.c
@@
-1,5
+1,5
@@
/* This file is part of the YAZ toolkit.
/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2012 Index Data
+ * Copyright (C) 1995-2013 Index Data
* See the file LICENSE for details.
*/
#if HAVE_CONFIG_H
* See the file LICENSE for details.
*/
#if HAVE_CONFIG_H
@@
-156,16
+156,6
@@
static int tst_convert(yaz_iconv_t cd, const char *buf, const char *cmpbuf)
return tst_convert_x(cd, buf, cmpbuf, 0);
}
return tst_convert_x(cd, buf, cmpbuf, 0);
}
-/* some test strings in ISO-8859-1 format */
-static const char *iso_8859_1_a[] = {
- "ax" ,
- "\xd8",
- "eneb\346r",
- "\xe5" "\xd8",
- "\xe5" "\xd8" "b",
- "\xe5" "\xe5",
- 0 };
-
static void tst_marc8_to_ucs4b(void)
{
yaz_iconv_t cd = yaz_iconv_open("UCS4", "MARC8");
static void tst_marc8_to_ucs4b(void)
{
yaz_iconv_t cd = yaz_iconv_open("UCS4", "MARC8");
@@
-288,6
+278,15
@@
static void tst_ucs4b_to_utf8(void)
static void dconvert(int mandatory, const char *tmpcode)
{
static void dconvert(int mandatory, const char *tmpcode)
{
+ /* some test strings in ISO-8859-1 format */
+ static const char *iso_8859_1_a[] = {
+ "ax" ,
+ "\xd8",
+ "eneb\346r",
+ "\xe5" "\xd8",
+ "\xe5" "\xd8" "b",
+ "\xe5" "\xe5",
+ 0 };
int i;
int ret;
yaz_iconv_t cd;
int i;
int ret;
yaz_iconv_t cd;
@@
-507,9
+506,12
@@
static void tst_utf8_to_marc8(const char *marc8_type)
/** UPPERCASE SCANDINAVIAN O */
YAZ_CHECK(tst_convert(cd, "S\xc3\x98", "S\xa2"));
/** UPPERCASE SCANDINAVIAN O */
YAZ_CHECK(tst_convert(cd, "S\xc3\x98", "S\xa2"));
- /** ARING */
+ /** ARING (NFD) */
YAZ_CHECK(tst_convert(cd, "A" "\xCC\x8A", "\xEA" "A"));
YAZ_CHECK(tst_convert(cd, "A" "\xCC\x8A", "\xEA" "A"));
+ /** ARING (NFC) */
+ YAZ_CHECK(tst_convert(cd, "\xC3\x85", "\xEA" "A"));
+
/** A MACRON + UMLAUT, DIAERESIS */
YAZ_CHECK(tst_convert(cd, "A" "\xCC\x84" "\xCC\x88",
"\xE5\xE8\x41"));
/** A MACRON + UMLAUT, DIAERESIS */
YAZ_CHECK(tst_convert(cd, "A" "\xCC\x84" "\xCC\x88",
"\xE5\xE8\x41"));