Skip to content

Commit 8a063e1

Browse files
committed
Use padded line number
Allows filetering like line0001 so not line1 line10 line11…
1 parent 8e22832 commit 8a063e1

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tests/phpunit/tests/html-api/wpHtmlProcessorHtml5lib.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ public function data_external_html5lib_tests() {
8484
foreach ( self::parse_html5_dat_testfile( $test_dir . $entry ) as $k => $test ) {
8585
// strip .dat extension from filename
8686
$test_suite = substr( $entry, 0, strlen( $entry ) - 4 );
87-
yield "{$test_suite}/line{$test[0]}" => array_slice( $test, 1 );
87+
$line = str_pad( strval( $test[0] ), 4, '0', STR_PAD_LEFT );
88+
89+
yield "{$test_suite}/line{$line}" => array_slice( $test, 1 );
8890
}
8991
}
9092
closedir( $handle );

0 commit comments

Comments
 (0)