mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Repair the seems_utf8() tests that use Big5 encoding.
* Provide sample data that is actually encoded in Big5. * Do some actual assertions against that data. Props akumria. Fixes #30455. git-svn-id: https://develop.svn.wordpress.org/trunk@30525 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
9b6563f70f
commit
ed426ef8ef
@ -1,51 +1,5 @@
|
||||
?lmDwgn H@~|Q
|
||||
|
||||
?lDg
|
||||
|
||||
H@
|
||||
|
||||
DiDAD`DCWiWAD`WCLAW?alQAWUC
|
||||
G`LAH[?F`AH[uC?APX?WAP?
|
||||
?C?S?AC
|
||||
|
||||
HG
|
||||
|
||||
?U?AcoQ?AoCGL??A
|
||||
?Au??AU?gAn?MAeHCOHtHBuL
|
||||
voAuv?CU@j?A??A?A\
|
||||
?~C??~AOHhC
|
||||
|
||||
HT
|
||||
|
||||
|A?QQofA?sQiA??
|
||||
COHutHvvA?A?Az?Aj?C`?LL
|
||||
C???]CuLvAhLvC
|
||||
|
||||
h|
|
||||
|
||||
uDvRA????CWAUvQUA?gAM
|
||||
AP?Q?FsC^?lHH?C
|
||||
|
||||
H
|
||||
|
||||
?aAHU?QtHAH?m?C?aAS
|
||||
GH?}A??UXCh?aApuC
|
||||
|
||||
H
|
||||
|
||||
AO??gC??AO??a?CYsA??C
|
||||
|
||||
HC
|
||||
|
||||
?a[C?a?HB[?AH???AG[COHtH
|
||||
?A~??sCDHLpHG?pC
|
||||
|
||||
HK
|
||||
|
||||
WYCQU?CBH?cAGXDC~aA?
|
||||
WAPAHAFvA?A?gC??AGL?C
|
||||
|
||||
HE
|
||||
|
||||
??ApwQ?UAiOC?AuQIQ
|
||||
zA?SC\EhA?DC
|
||||
<EFBFBD>セ
|
||||
だ寵
|
||||
泉航
|
||||
<EFBFBD>処
|
||||
ⅥⅡ
|
||||
|
||||
@ -10,7 +10,7 @@ class Tests_Formatting_SeemsUtf8 extends WP_UnitTestCase {
|
||||
*
|
||||
* @dataProvider utf8_strings
|
||||
*/
|
||||
function test_returns_true_for_utf8_strings( $utf8_string ) {
|
||||
function test_returns_true_for_utf8_strings( $utf8_string ) {
|
||||
// from http://www.i18nguy.com/unicode-example.html
|
||||
$this->assertTrue( seems_utf8( $utf8_string ) );
|
||||
}
|
||||
@ -28,19 +28,17 @@ class Tests_Formatting_SeemsUtf8 extends WP_UnitTestCase {
|
||||
* @dataProvider big5_strings
|
||||
*/
|
||||
function test_returns_false_for_non_utf8_strings( $big5_string ) {
|
||||
$this->markTestIncomplete( 'This test does not have any assertions.' );
|
||||
|
||||
$big5 = $big5[0];
|
||||
$strings = array(
|
||||
"abc",
|
||||
"123",
|
||||
$big5
|
||||
);
|
||||
$this->assertFalse( seems_utf8( $big5_string ) );
|
||||
}
|
||||
|
||||
function big5_strings() {
|
||||
// Get data from formatting/big5.txt
|
||||
return array( array( 'incomplete' ) );
|
||||
$big5_strings = file( DIR_TESTDATA . '/formatting/big5.txt' );
|
||||
foreach ( $big5_strings as &$string ) {
|
||||
$string = (array) trim( $string );
|
||||
}
|
||||
unset( $string );
|
||||
return $big5_strings;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user