File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,4 +49,33 @@ let numberTest1 = sqlExternal`number: ${42}`
4949let numberTest2 = sqlReScript ` number: ${42}`
5050
5151let stringTest1 = sqlExternal ` string: ${"test" }`
52- let stringTest2 = sqlReScript ` string: ${"test" }`
52+ let stringTest2 = sqlReScript ` string: ${"test" }`
53+
54+ // NEW: Test regular template literals (the main issue)
55+ // These should generate template literal syntax instead of string concatenation
56+
57+ let name = "World"
58+ let count = 42
59+
60+ // Basic template literal with one interpolation
61+ let basicTemplate = ` Hello ${name}!`
62+
63+ // Template literal with multiple interpolations
64+ let multiTemplate = ` Hello ${name}, you have ${count} messages`
65+
66+ // Template literal with number interpolation
67+ let numberTemplate = ` Count: ${count}`
68+
69+ // Template literal with mixed types
70+ let mixedTemplate = ` User: ${name} (${count} years old)`
71+
72+ // Template literals with empty strings
73+ let emptyStart = ` ${name} is here`
74+ let emptyEnd = ` Welcome ${name}`
75+ let emptyMiddle = ` ${name}${count}`
76+
77+ // Template literal with just interpolation (edge case)
78+ let justInterpolation = ` ${name}`
79+
80+ // Nested template expressions
81+ let nested = ` Outer: ${` Inner: ${name}` }`
You can’t perform that action at this time.
0 commit comments