[dev] Horde_Util Transliterate iconv test
Ralf Lang
lang at b1-systems.de
Tue Apr 6 08:26:37 UTC 2021
Hi,
we detected a problem with the horde_util iconv test (at least our
version) - some conversions are not happening as expected.
Here's our test suite by Marco (with the affected tests skipped for now).
https://github.com/maintaina-com/Util/runs/2276052452?check_suite_focus=true
1) Horde\Util\TransliterateTest::testTransliterateToAsciiIconv with data
set #1 ('AÀBEÉSß', 'AABEESss')
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'AABEESss'
+'A?BE?Sss'
/srv/git/util/test/Horde/Util/TransliterateTest.php:76
/srv/www/horde/vendor/phpunit/phpunit/src/TextUI/Command.php:142
/srv/www/horde/vendor/phpunit/phpunit/src/TextUI/Command.php:95
/srv/www/horde/vendor/phpunit/phpunit/phpunit:61
2) Horde\Util\TransliterateTest::testTransliterateToAsciiIconv with data
set #2 ('AÀ黾B', 'AA?B')
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'AA?B'
+'A??B'
/srv/git/util/test/Horde/Util/TransliterateTest.php:76
/srv/www/horde/vendor/phpunit/phpunit/src/TextUI/Command.php:142
/srv/www/horde/vendor/phpunit/phpunit/src/TextUI/Command.php:95
/srv/www/horde/vendor/phpunit/phpunit/phpunit:61
I tried to look into horde's original test suite but I did not find any
differences.
Then I wanted to check if the original tests also fail in travis-ci.
https://www.travis-ci.org/github/horde/Util/jobs/663183844
This run also has some skipped tests but I think this version works.
I don't have a very deep understanding of iconv. I also see very
different kinds of garbage depending on which editor I actually use.
Would it be OK to change the raw UTF-8 chars in the test fixtures into
\x or \u representation (with comment) or something similar?
--
Ralf Lang
Linux Consultant / Developer
Tel.: +49-170-6381563
Mail: lang at b1-systems.de
B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
More information about the dev
mailing list