Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions tests/Core/Util/Common/EscapeshellcmdTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,27 +59,27 @@ public static function dataEscapeshellcmd()
{
return [
'Command is empty string' => [
'text' => '',
'command' => '',
'expected' => '',
],
'Command is simple string' => [
'text' => 'csslint',
'command' => 'csslint',
'expected' => 'csslint',
],
'Command containing characters which PHP escapes' => [
'text' => '&#;`|*?~<>^()[]{}$\,%!',
'command' => '&#;`|*?~<>^()[]{}$\,%!',
'expected' => '\&\#\;\`\|\*\?\~\<\>\^\(\)\[\]\{\}\$\\\\,%!',
'expectedWin' => '^&^#^;^`^|^*^?^~^<^>^^^(^)^[^]^{^}^$^\,^%^!',
],
// @link https://github.com/squizlabs/PHP_CodeSniffer/pull/3214
'Command containing spaces, which can cause problems on Windows' => [
'text' => 'C:\Program Files\nodejs\csslint.cmd',
'command' => 'C:\Program Files\nodejs\csslint.cmd',
'expected' => 'C:\\\\Program Files\\\\nodejs\\\\csslint.cmd',
'expectedWin' => 'C:^\Program^ Files^\nodejs^\csslint.cmd',
],
// @link https://github.com/php/doc-en/pull/511
'Command containing spaces with additional arguments' => [
'text' => 'php -f ./~home/path to/file.php',
'command' => 'php -f ./~home/path to/file.php',
'expected' => 'php -f ./\~home/path to/file.php',
'expectedWin' => 'php^ -f^ ./^~home/path^ to/file.php',
],
Expand Down