diff options
author | Markus Roberts <Markus@reality.com> | 2010-10-18 14:25:17 -0700 |
---|---|---|
committer | Markus Roberts <Markus@reality.com> | 2010-10-18 16:24:31 -0700 |
commit | 3b53bfcd0dd20a43c751b2b0d5dbb0e3463ef47b (patch) | |
tree | 5bed430d4525a4e1b1532974ced06da9c1d83162 /spec | |
parent | e3fc5b95d133aee1ae3dc188e6c47e88786dfc6e (diff) | |
download | puppet-3b53bfcd0dd20a43c751b2b0d5dbb0e3463ef47b.tar.gz puppet-3b53bfcd0dd20a43c751b2b0d5dbb0e3463ef47b.tar.xz puppet-3b53bfcd0dd20a43c751b2b0d5dbb0e3463ef47b.zip |
Fix for #5022 -- Escaped newlines should be elided
This was a regression, not covered by a test; previously the string
"foo\
bar"
would be interpreded as "foobar" but this was changed to "foo\\\nbar" in
2.6.x with my string interpolation refactor. This change restores the
behaviour.
Diffstat (limited to 'spec')
-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 2d67bf357..d52add399 100755 --- a/spec/unit/parser/lexer_spec.rb +++ b/spec/unit/parser/lexer_spec.rb @@ -424,6 +424,7 @@ describe Puppet::Parser::Lexer,"when lexing strings" do %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 '$'"]], + %Q{"string with a line ending with a backslash: \\\nfoo"} => [[:STRING,"string with a line ending with a backslash: foo"]], %q{"string with $v (but no braces)"} => [[:DQPRE,"string with "],[:VARIABLE,'v'],[:DQPOST,' (but no braces)']], %q["string with ${v} in braces"] => [[:DQPRE,"string with "],[:VARIABLE,'v'],[:DQPOST,' in braces']], %q["string with ${qualified::var} in braces"] => [[:DQPRE,"string with "],[:VARIABLE,'qualified::var'],[:DQPOST,' in braces']], |