Changeset 47122 for trunk/tests/phpunit/tests/pomo/po.php
- Timestamp:
- 01/29/2020 12:43:23 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/pomo/po.php
r46612 r47122 8 8 parent::setUp(); 9 9 require_once ABSPATH . '/wp-includes/pomo/po.php'; 10 // not so random wordpress.pot string -- multiple lines10 // Not so random wordpress.pot string -- multiple lines. 11 11 $this->mail = 'Your new WordPress blog has been successfully set up at: 12 12 … … 51 51 function test_poify() { 52 52 $po = new PO(); 53 // simple53 // Simple. 54 54 $this->assertEquals( '"baba"', $po->poify( 'baba' ) ); 55 // long word55 // Long word. 56 56 $this->assertEquals( $this->po_a90, $po->poify( $this->a90 ) ); 57 // tab57 // Tab. 58 58 $this->assertEquals( '"ba\tba"', $po->poify( "ba\tba" ) ); 59 // do not add leading empty string of one-line string ending on a newline59 // Do not add leading empty string of one-line string ending on a newline. 60 60 $this->assertEquals( '"\\\\a\\\\n\\n"', $po->poify( "\a\\n\n" ) ); 61 // backslash61 // Backslash. 62 62 $this->assertEquals( '"ba\\\\ba"', $po->poify( 'ba\\ba' ) ); 63 // random wordpress.pot string63 // Random wordpress.pot string. 64 64 $src = 'Categories can be selectively converted to tags using the <a href="%s">category to tag converter</a>.'; 65 65 $this->assertEquals( '"Categories can be selectively converted to tags using the <a href=\\"%s\\">category to tag converter</a>."', $po->poify( $src ) ); … … 74 74 $this->assertEquals( $this->a90, $po->unpoify( $this->po_a90 ) ); 75 75 $this->assertEquals( '\\t\\n', $po->unpoify( '"\\\\t\\\\n"' ) ); 76 // wordwrapped76 // Wordwrapped. 77 77 $this->assertEquals( 'babadyado', $po->unpoify( "\"\"\n\"baba\"\n\"dyado\"" ) ); 78 78 $this->assertEqualsIgnoreEOL( $this->mail, $po->unpoify( $this->po_mail ) ); … … 83 83 $entry = new Translation_Entry( array( 'singular' => 'baba' ) ); 84 84 $this->assertEquals( "msgid \"baba\"\nmsgstr \"\"", $po->export_entry( $entry ) ); 85 // plural85 // Plural. 86 86 $entry = new Translation_Entry( 87 87 array( … … 182 182 $po->export_entry( $entry ) 183 183 ); 184 // context184 // Context. 185 185 $entry = new Translation_Entry( 186 186 array( … … 321 321 } 322 322 323 // TODO: add tests for bad files323 // TODO: Add tests for bad files. 324 324 } 325 325
Note: See TracChangeset
for help on using the changeset viewer.