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

Test: Write more test suites #89

Merged
merged 34 commits into from Sep 7, 2016
Commits
File filter...
Filter file types
Jump to file or symbol
Failed to load files and symbols.
+3 −3
Diff settings

Always

Just for now

Disassembly: Escape the escaping symbol.

  • Loading branch information...
Hywan committed Sep 5, 2016
commit 0d5d80e0d0c5b6d0fd0cb26899726b3f1bfa39b1
@@ -182,7 +182,7 @@ public function case_scalar_escaped_string()
"'He\llo, \'World\'!'",
'$model = new \Hoa\Ruler\Model();' . "\n" .
'$model->expression =' . "\n" .
' \'He\llo, \'World\'!\';'
' \'He\llo, \\\'World\\\'!\';'
);
}
Copy path View file
@@ -126,7 +126,7 @@ public function visit(Visitor\Element $element, &$handle = null, $eldnah = null)
} elseif (is_numeric($value)) {
$out .= (string) $value;
} else {
$out .= '\'' . str_replace('\\', '\\\'', $value) . '\'';
$out .= '\'' . str_replace(['\'', '\\\\',], ['\\\'', '\\'], $value) . '\'';
}
} elseif ($element instanceof Ruler\Model\Bag\RulerArray) {
$values = [];
Copy path View file
@@ -98,7 +98,7 @@ public function visit(Visitor\Element $element, &$handle = null, $eldnah = null)
} elseif (is_numeric($value)) {
$out .= (string) $value;
} else {
$out .= '\'' . str_replace('\\', '\\\'', $value) . '\'';
$out .= '\'' . str_replace(['\\', '\''], ['\\', '\\\''], $value) . '\'';
}
} elseif ($element instanceof Ruler\Model\Bag\RulerArray) {
$values = [];
ProTip! Use n and p to navigate between commits in a pull request.