diff options
| author | Markus Roberts <Markus@reality.com> | 2010-08-05 22:00:54 -0700 |
|---|---|---|
| committer | Markus Roberts <Markus@reality.com> | 2010-08-05 22:23:04 -0700 |
| commit | a23d80aebabf981a34fcca5c8bd2aa5f44ea832d (patch) | |
| tree | 0b033e3875a1517f0ddd6aa6ccea2bc9dd9063cd /spec/unit/parser | |
| parent | 8e31b528e139a2940d6932ab80375bb5eebfbe29 (diff) | |
| download | puppet-a23d80aebabf981a34fcca5c8bd2aa5f44ea832d.tar.gz puppet-a23d80aebabf981a34fcca5c8bd2aa5f44ea832d.tar.xz puppet-a23d80aebabf981a34fcca5c8bd2aa5f44ea832d.zip | |
Fixes #4485 -- single quoted strings should not treat \n as new line
This is the rest of the change for #4303; James and I discussed various
ways the solution to that ticket needed to be extended but, as neither of us
committed code, nothing changed. This is the least implact extension, which
mimics the behaviour of prior versions.
It leaves open the question: should '\\x' start with a single or double
backslash? If, as now, '\\x' starts with a double backslash (i.e. single quote
is the only escapable characterin single quoted strings) a string ending in a
backslash can not be represented in a single quoted string.
Diffstat (limited to 'spec/unit/parser')
| -rwxr-xr-x | spec/unit/parser/lexer_spec.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/spec/unit/parser/lexer_spec.rb b/spec/unit/parser/lexer_spec.rb index bcf49baeb..7e51423f4 100755 --- a/spec/unit/parser/lexer_spec.rb +++ b/spec/unit/parser/lexer_spec.rb @@ -412,6 +412,7 @@ describe Puppet::Parser::Lexer,"when lexing strings" do %q{'single quoted string with an escaped "\\'"'} => [[:STRING,'single quoted string with an escaped "\'"']], %q{'single quoted string with an escaped "\$"'} => [[:STRING,'single quoted string with an escaped "\$"']], %q{'single quoted string with an escaped "\."'} => [[:STRING,'single quoted string with an escaped "\."']], + %q{'single quoted string with an escaped "\n"'} => [[:STRING,'single quoted string with an escaped "\n"']], %q{'single quoted string with an escaped "\\\\"'} => [[:STRING,'single quoted string with an escaped "\\\\"']], %q{"string with an escaped '\\"'"} => [[:STRING,"string with an escaped '\"'"]], %q{"string with an escaped '\\$'"} => [[:STRING,"string with an escaped '$'"]], |
