Skip to content

Commit 4e8771a

Browse files
committed
Add Windows specific assertion
1 parent a1efaef commit 4e8771a

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

tests/Test_Table.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
use cli\Colors;
44
use cli\Table;
55
use cli\Table\Ascii;
6+
use cli\Shell;
67
use WP_CLI\Tests\TestCase;
78

89
/**
@@ -96,7 +97,11 @@ public function test_column_odd_single_width_with_double_width() {
9697
$result = $strip_borders( explode( "\n", $out ) );
9798

9899
$this->assertSame( 3, count( $result ) );
99-
$this->assertSame( '1あいうえ ', $result[0] ); // 1 single width, 4 double-width, space = 10.
100+
if ( Shell::is_windows() ) {
101+
$this->assertSame( '1あいうえ ', $result[0] );
102+
} else {
103+
$this->assertSame( '1あいうえ ', $result[0] ); // 1 single-width, 4 double-width, space = 10.
104+
}
100105
$this->assertSame( 'おか2きくカ', $result[1] ); // 2 double-width, 1 single-width, 2 double-width, 1 half-width = 10.
101106
$this->assertSame( 'けこ ', $result[2] ); // 2 double-width, 8 spaces = 10.
102107

0 commit comments

Comments
 (0)