mirror of
https://github.com/pestphp/pest.git
synced 2026-04-21 14:37:29 +02:00
Merge pull request #1624 from Vmadmax/fix/unicode-filename-filter
fix: preserve Unicode characters in filenames for --filter matching
This commit is contained in:
@ -1802,6 +1802,10 @@
|
|||||||
- todo
|
- todo
|
||||||
- todo in parallel
|
- todo in parallel
|
||||||
|
|
||||||
|
PASS Tests\Visual\UnicodeFilename
|
||||||
|
✓ filter works with unicode characters in filename
|
||||||
|
✓ filter with unicode regex matches unicode filename
|
||||||
|
|
||||||
WARN Tests\Visual\Version
|
WARN Tests\Visual\Version
|
||||||
- visual snapshot of help command output
|
- visual snapshot of help command output
|
||||||
|
|
||||||
@ -1809,4 +1813,5 @@
|
|||||||
✓ pass with dataset with ('my-datas-set-value')
|
✓ pass with dataset with ('my-datas-set-value')
|
||||||
✓ within describe → pass with dataset with ('my-datas-set-value')
|
✓ within describe → pass with dataset with ('my-datas-set-value')
|
||||||
|
|
||||||
Tests: 2 deprecated, 4 warnings, 5 incomplete, 2 notices, 39 todos, 35 skipped, 1209 passed (2842 assertions)
|
Tests: 2 deprecated, 4 warnings, 5 incomplete, 2 notices, 39 todos, 35 skipped, 1209 passed (2842 assertions)
|
||||||
|
|
||||||
|
|||||||
37
tests/Visual/UnicodeFilename.php
Normal file
37
tests/Visual/UnicodeFilename.php
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Symfony\Component\Process\Process;
|
||||||
|
|
||||||
|
test('filter works with unicode characters in filename', function () {
|
||||||
|
$process = new Process([
|
||||||
|
'php',
|
||||||
|
'bin/pest',
|
||||||
|
'tests/.tests/StraßenTest.php',
|
||||||
|
'--colors=never',
|
||||||
|
], dirname(__DIR__, 2), ['COLLISION_PRINTER' => 'DefaultPrinter', 'COLLISION_IGNORE_DURATION' => 'true']);
|
||||||
|
|
||||||
|
$process->run();
|
||||||
|
|
||||||
|
$output = $process->getOutput();
|
||||||
|
|
||||||
|
expect($output)->toContain('StraßenTest');
|
||||||
|
expect($output)->toContain('tests unicode filename');
|
||||||
|
expect($output)->toContain('1 passed');
|
||||||
|
})->skipOnWindows();
|
||||||
|
|
||||||
|
test('filter with unicode regex matches unicode filename', function () {
|
||||||
|
$process = new Process([
|
||||||
|
'php',
|
||||||
|
'bin/pest',
|
||||||
|
'--filter=.*Straß.*',
|
||||||
|
'tests/.tests/',
|
||||||
|
'--colors=never',
|
||||||
|
], dirname(__DIR__, 2), ['COLLISION_PRINTER' => 'DefaultPrinter', 'COLLISION_IGNORE_DURATION' => 'true']);
|
||||||
|
|
||||||
|
$process->run();
|
||||||
|
|
||||||
|
$output = $process->getOutput();
|
||||||
|
|
||||||
|
expect($output)->toContain('StraßenTest');
|
||||||
|
expect($output)->toContain('1 passed');
|
||||||
|
})->skipOnWindows();
|
||||||
Reference in New Issue
Block a user