X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Funinorm%2Ftest-compat-decomposition.c;h=40dcb4828c0b9cf9c6a587b81422272b5666dd5f;hb=56fcb71cb3d5219bcb17eeb77b6ea9b624e52508;hp=d92ae365bddac7942e98e83a64735eddb32d11f3;hpb=a8b6c5957f108054f46f4b1dedafdea28b5809f6;p=gnulib.git diff --git a/tests/uninorm/test-compat-decomposition.c b/tests/uninorm/test-compat-decomposition.c index d92ae365b..40dcb4828 100644 --- a/tests/uninorm/test-compat-decomposition.c +++ b/tests/uninorm/test-compat-decomposition.c @@ -1,5 +1,5 @@ /* Test of compatibility decomposition of Unicode characters. - Copyright (C) 2009 Free Software Foundation, Inc. + Copyright (C) 2009-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,22 +20,8 @@ #include "uninorm/decompose-internal.h" -#include -#include - #include "uninorm.h" - -#define ASSERT(expr) \ - do \ - { \ - if (!(expr)) \ - { \ - fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ - fflush (stderr); \ - abort (); \ - } \ - } \ - while (0) +#include "macros.h" int main () @@ -175,10 +161,18 @@ main () /* HANGUL SYLLABLE GEUL */ ret = uc_compat_decomposition (0xAE00, decomposed); + /* See the clarification at , + section "Clarification of Hangul Jamo Handling". */ +#if 1 + ASSERT (ret == 2); + ASSERT (decomposed[0] == 0xADF8); + ASSERT (decomposed[1] == 0x11AF); +#else ASSERT (ret == 3); ASSERT (decomposed[0] == 0x1100); ASSERT (decomposed[1] == 0x1173); ASSERT (decomposed[2] == 0x11AF); +#endif /* HANGUL SYLLABLE GEU */ ret = uc_compat_decomposition (0xADF8, decomposed);