File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -146,6 +146,35 @@ public function testTableWithPercentCharacters() {
146146| % at start | at end % | in % middle |
147147+------------+----------+-------------+
148148
149+ OUT;
150+ $ this ->assertInOutEquals (array ($ headers , $ rows ), $ output );
151+ }
152+
153+ /**
154+ * Test that a % is appropriately padded in the table
155+ */
156+ public function testTablePaddingWithPercentCharacters () {
157+ $ headers = array ( 'ID ' , 'post_title ' , 'post_name ' );
158+ $ rows = array (
159+ array (
160+ 3 ,
161+ '10% ' ,
162+ ''
163+ ),
164+ array (
165+ 1 ,
166+ 'Hello world! ' ,
167+ 'hello-world '
168+ ),
169+ );
170+ $ output = <<<'OUT'
171+ +----+--------------+-------------+
172+ | ID | post_title | post_name |
173+ +----+--------------+-------------+
174+ | 3 | 10% | |
175+ | 1 | Hello world! | hello-world |
176+ +----+--------------+-------------+
177+
149178OUT;
150179 $ this ->assertInOutEquals (array ($ headers , $ rows ), $ output );
151180 }
You can’t perform that action at this time.
0 commit comments