[test issue] expecting "unicode(#) <substring value>" but pftt output "string(#) <substring value>" #36

Closed
opened 2026-01-24 11:40:23 +01:00 by admin · 7 comments
Owner

Originally created by @hollyhuiLi on GitHub (Jun 25, 2019).

typical test case: ext/phar/tests/tar/allu.phpt
diff:
@@ -6,1 +6,1 @@
string(2) "hi"
string(3) "hi2"
string(3) "hi3"
+string(6) "100444"
-unicode(6) "100444"
@@ -10,2 +10,2 @@
string(32) "<?php ok __HALT_COMPILER(); ?>
"
string(4) "hime"
+string(8) "hi there"
+string(6) "a meta"
-unicode(8) "hi there"
-unicode(6) "a meta"
-===DONE===

Originally created by @hollyhuiLi on GitHub (Jun 25, 2019). typical test case: ext/phar/tests/tar/allu.phpt diff: &#64;&#64; -6,1 +6,1 &#64;&#64; string(2) "hi" string(3) "hi2" string(3) "hi3" +string(6) "100444" -unicode(6) "100444" &#64;&#64; -10,2 +10,2 &#64;&#64; string(32) "&lt;?php ok __HALT_COMPILER(); ?&gt; " string(4) "hime" +string(8) "hi there" +string(6) "a meta" -unicode(8) "hi there" -unicode(6) "a meta" -===DONE===
admin closed this issue 2026-01-24 11:40:24 +01:00
Author
Owner

@hollyhuiLi commented on GitHub (Jun 25, 2019):

Similar failed test cases:

ext/phar/tests/018u.phpt
ext/phar/tests/019bu.phpt
ext/phar/tests/019cu.phpt
ext/phar/tests/ini_set_offu.phpt
ext/phar/tests/metadata_readu.phpt
ext/phar/tests/phar_begin_setstub_commitu.phpt
ext/phar/tests/phar_metadata_readu.phpt
ext/phar/tests/phar_oo_001u.phpt
ext/phar/tests/phar_oo_004u.phpt
ext/phar/tests/tar/allu.phpt
ext/phar/tests/tar/phar_begin_setstub_commitu.phpt
ext/phar/tests/zip/allu.phpt
ext/phar/tests/zip/metadata_write_commitu.phpt
ext/phar/tests/zip/phar_begin_setstub_commitu.phpt

@hollyhuiLi commented on GitHub (Jun 25, 2019): Similar failed test cases: ext/phar/tests/018u.phpt ext/phar/tests/019bu.phpt ext/phar/tests/019cu.phpt ext/phar/tests/ini_set_offu.phpt ext/phar/tests/metadata_readu.phpt ext/phar/tests/phar_begin_setstub_commitu.phpt ext/phar/tests/phar_metadata_readu.phpt ext/phar/tests/phar_oo_001u.phpt ext/phar/tests/phar_oo_004u.phpt ext/phar/tests/tar/allu.phpt ext/phar/tests/tar/phar_begin_setstub_commitu.phpt ext/phar/tests/zip/allu.phpt ext/phar/tests/zip/metadata_write_commitu.phpt ext/phar/tests/zip/phar_begin_setstub_commitu.phpt
Author
Owner

@cmb69 commented on GitHub (Jun 25, 2019):

Hmm, (unicode) had been planned for PHP 6, but removed from PHP 7. Where do these test case come from? They're not contained in php-test-pack-7.3.6.zip, for instance, nor in php/php-src checkouts. Does PFTT2 create these test cases?

@cmb69 commented on GitHub (Jun 25, 2019): Hmm, `(unicode)` had been planned for PHP 6, but removed from PHP 7. Where do these test case come from? They're not contained in php-test-pack-7.3.6.zip, for instance, nor in php/php-src checkouts. Does PFTT2 create these test cases?
Author
Owner

@hollyhuiLi commented on GitHub (Jun 25, 2019):

They are not in 7.2 or 7.3, but they do contained in 7.1 test packages.

@hollyhuiLi commented on GitHub (Jun 25, 2019): They are not in 7.2 or 7.3, but they do contained in 7.1 test packages.
Author
Owner

@cmb69 commented on GitHub (Jun 25, 2019):

Indeed, thanks! However, at least allU.phpt is supposed to be skipped due to 5533f2490a/ext/phar/tests/tar/allU.phpt (L6). I have not checked the other test files. In any way, these tests are unlikely to be touched, so we'd to work around.

@cmb69 commented on GitHub (Jun 25, 2019): Indeed, thanks! However, at least allU.phpt is supposed to be skipped due to https://github.com/php/php-src/blob/5533f2490aed3e7c4cea8b22e331c3b40b6b36c2/ext/phar/tests/tar/allU.phpt#L6. I have not checked the other test files. In any way, these tests are unlikely to be touched, so we'd to work around.
Author
Owner

@hollyhuiLi commented on GitHub (Aug 20, 2019):

Should we mark them as skip in 7.1 tests?

@hollyhuiLi commented on GitHub (Aug 20, 2019): Should we mark them as skip in 7.1 tests?
Author
Owner

@cmb69 commented on GitHub (Aug 20, 2019):

At least some of these tests alread have:

if (version_compare(PHP_VERSION, "6.0", "!=")) die("skip Unicode support required");

So they should already be skipped.

PS: I actually run all tests mentionend in this ticket with PHP 7.1.31, and all have been skipped.

@cmb69 commented on GitHub (Aug 20, 2019): At least some of these tests alread have: ````php if (version_compare(PHP_VERSION, "6.0", "!=")) die("skip Unicode support required"); ```` So they should already be skipped. PS: I actually run all tests mentionend in this ticket with PHP 7.1.31, and all have been skipped.
Author
Owner

@hollyhuiLi commented on GitHub (Sep 25, 2019):

Verified these test are now skipped after change with pull request #57

@hollyhuiLi commented on GitHub (Sep 25, 2019): Verified these test are now skipped after change with pull request #57
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: php/pftt2#36