-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--filter + --loop = fail #15
Comments
@Hywan can you describe the fail you get? |
An error in the ruler-extension. |
When I take this test (https://gist.github.com/agallou/67835a4181b077e32220) on this gist with the filter I get this error :
when I launch this command :
(that works withtout the --loop option) I will look into it. |
The rule seems to be escaped when using the loop option. |
seems to be a problem in the toString method of the cli class : https://github.com/atoum/atoum/blob/master/classes/cli/command.php#L31 When removing the escaping in vendor/atoum/atoum/classes/cli/command.php 44d43
<
57c56
< $command .= ' ' . escapeshellarg($value);
---
> $command .= sprintf(' "%s"', $value);
68c67
< $command = escapeshellcmd($this->binaryPath . $command);
---
> $command = $this->binaryPath . $command;
70d68
< the loop mode works in conjuction with the ruler extension. I'll try to find a better fix. |
@agallou Good! Maybe @mageekguy could help on this one? |
@Hywan @agallou you should look at this: https://github.com/atoum/atoum/blob/d361021cc7a0448f2e609e2357f668b50d9bd3b8/classes/scripts/runner.php#L1200 and also in the |
When the ruler-extension with the loop mode was runned and the filter argument had a single quote, this error occurs : ``` Error: Context reference \test1\\ does not exists. ``` cf atoum/ruler-extension#15 This occurs because there was too much escaping when running the loop mode : ``` /usr/bin/php5 -f ./vendor/bin/atoum -- --disable-loop-mode --force-terminal -f 'toto_test.php' --filter ''\\''test1'\\'' in tags' --score-file '/tmp/atoum.score' ``` Now the command launched by the loop mode is properly escaped : ``` /usr/bin/php5 -f ./vendor/bin/atoum -- --disable-loop-mode --force-terminal -f 'toto_test.php' --filter ''\''test1'\'' in tags' --score-file '/tmp/atoum.score' ```
When the ruler-extension with the loop mode was runned and the filter argument had a single quote, this error occurs : ``` Error: Context reference \test1\\ does not exists. ``` cf atoum/ruler-extension#15 This occurs because there was too much escaping when running the loop mode : ``` /usr/bin/php5 -f ./vendor/bin/atoum -- --disable-loop-mode --force-terminal -f 'toto_test.php' --filter ''\\''test1'\\'' in tags' --score-file '/tmp/atoum.score' ``` Now the command launched by the loop mode is properly escaped : ``` /usr/bin/php5 -f ./vendor/bin/atoum -- --disable-loop-mode --force-terminal -f 'toto_test.php' --filter ''\''test1'\'' in tags' --score-file '/tmp/atoum.score' ```
Do you reproduce?
The text was updated successfully, but these errors were encountered: