mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
Merge branch 'master' of github.com:jashkenas/coffeescript into 2
# Conflicts: # docs/v1/browser-compiler/coffee-script.js # lib/coffee-script/browser.js # lib/coffee-script/cake.js # lib/coffee-script/coffee-script.js # lib/coffee-script/command.js # lib/coffee-script/grammar.js # lib/coffee-script/helpers.js # lib/coffee-script/index.js # lib/coffee-script/lexer.js # lib/coffee-script/nodes.js # lib/coffee-script/optparse.js # lib/coffee-script/register.js # lib/coffee-script/repl.js # lib/coffee-script/rewriter.js # lib/coffee-script/scope.js # lib/coffee-script/sourcemap.js # package.json # src/coffee-script.coffee # src/nodes.coffee
This commit is contained in:
@@ -137,3 +137,35 @@ test "tagged template literal with an interpolated string that itself contains a
|
||||
test "tagged template literal with an interpolated string that contains a tagged template literal", ->
|
||||
eq 'text: [inner tagged | literal] expressions: [text: [|] expressions: [template]]',
|
||||
func"inner tagged #{func"#{'template'}"} literal"
|
||||
|
||||
test "tagged template literal with backticks", ->
|
||||
eq 'text: [ES template literals look like this: `foo bar`] expressions: []',
|
||||
func"ES template literals look like this: `foo bar`"
|
||||
|
||||
test "tagged template literal with escaped backticks", ->
|
||||
eq 'text: [ES template literals look like this: \\`foo bar\\`] expressions: []',
|
||||
func"ES template literals look like this: \\`foo bar\\`"
|
||||
|
||||
test "tagged template literal with unnecessarily escaped backticks", ->
|
||||
eq 'text: [ES template literals look like this: `foo bar`] expressions: []',
|
||||
func"ES template literals look like this: \`foo bar\`"
|
||||
|
||||
test "tagged template literal with ES interpolation", ->
|
||||
eq 'text: [ES template literals also look like this: `3 + 5 = ${3+5}`] expressions: []',
|
||||
func"ES template literals also look like this: `3 + 5 = ${3+5}`"
|
||||
|
||||
test "tagged template literal with both ES and CoffeeScript interpolation", ->
|
||||
eq "text: [ES template literals also look like this: `3 + 5 = ${3+5}` which equals |] expressions: [8]",
|
||||
func"ES template literals also look like this: `3 + 5 = ${3+5}` which equals #{3+5}"
|
||||
|
||||
test "tagged template literal with escaped ES interpolation", ->
|
||||
eq 'text: [ES template literals also look like this: `3 + 5 = \\${3+5}`] expressions: []',
|
||||
func"ES template literals also look like this: `3 + 5 = \\${3+5}`"
|
||||
|
||||
test "tagged template literal with unnecessarily escaped ES interpolation", ->
|
||||
eq 'text: [ES template literals also look like this: `3 + 5 = ${3+5}`] expressions: []',
|
||||
func"ES template literals also look like this: `3 + 5 = \${3+5}`"
|
||||
|
||||
test "tagged template literal special escaping", ->
|
||||
eq 'text: [` ` \\` \\` \\\\` $ { ${ ${ \\${ \\${ \\\\${ | ` ${] expressions: [1]',
|
||||
func"` \` \\` \\\` \\\\` $ { ${ \${ \\${ \\\${ \\\\${ #{1} ` ${"
|
||||
|
||||
Reference in New Issue
Block a user