Skip to content

Commit

Permalink
Use padded line number
Browse files Browse the repository at this point in the history
Allows filetering like line0001 so not line1 line10 line11…
  • Loading branch information
sirreal committed Jan 16, 2024
1 parent 48eb7b9 commit 1e01888
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/phpunit/tests/html-api/wpHtmlProcessorHtml5lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ public function data_external_html5lib_tests() {
foreach ( self::parse_html5_dat_testfile( $test_dir . $entry ) as $k => $test ) {
// strip .dat extension from filename
$test_suite = substr( $entry, 0, strlen( $entry ) - 4 );
yield "{$test_suite}/line{$test[0]}" => array_slice( $test, 1 );
$line = str_pad( strval( $test[0] ), 4, '0', STR_PAD_LEFT );

yield "{$test_suite}/line{$line}" => array_slice( $test, 1 );
}
}
closedir( $handle );
Expand Down

0 comments on commit 1e01888

Please sign in to comment.