From f7161c34cbd45d87124ad25cf06d3ff57e3bc23f Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 20 Apr 2012 23:11:53 +0200 Subject: reenabled romanization test The test can be skipped by excluding the "slow" group. --- _test/tests/inc/utf8_romanize.test.php | 37 ++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 _test/tests/inc/utf8_romanize.test.php (limited to '_test/tests/inc/utf8_romanize.test.php') diff --git a/_test/tests/inc/utf8_romanize.test.php b/_test/tests/inc/utf8_romanize.test.php new file mode 100644 index 000000000..d08346faa --- /dev/null +++ b/_test/tests/inc/utf8_romanize.test.php @@ -0,0 +1,37 @@ + + */ + function test_japanese(){ + $tests = file(dirname(__FILE__).'/utf8_kanaromaji.txt'); + $line = 1; + foreach($tests as $test){ + list($jap,$rom) = explode(';',trim($test)); + + $chk = utf8_romanize($jap); + $this->assertEquals($rom,$chk,"$jap\t->\t$chk\t!=\t$rom\t($line)"); + $line++; + } + } + + /** + * Test romanization of character that would usually be deaccented in a different + * way FS#1117 + * + * @author Andreas Gohr + */ + function test_deaccented(){ + $this->assertEquals("a A a A a o O",utf8_romanize("å Å ä Ä ä ö Ö")); + } +} +//Setup VIM: ex: et ts=4 : -- cgit v1.2.3