Skip to content

Commit 56b8642

Browse files
committed
make the test slightly more complex
the goal is to test abusive inlining of the resulting string
1 parent b99312a commit 56b8642

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

jscomp/test/tagged_template_lib.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
exports.sql = (strings, ...values) => {
22
let result = "";
33
for (let i = 0; i < values.length; i++) {
4-
result += strings[i] + values[i];
4+
result += strings[i] + "'" + values[i] + "'";
55
}
66
result += strings[values.length];
77
return result;

jscomp/test/tagged_template_test.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jscomp/test/tagged_template_test.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Mt.from_pair_suites(
2222
list{
2323
(
2424
"with externals, it should return a string with the correct interpolations",
25-
() => Eq(query, "SELECT * FROM users WHERE id = 5"),
25+
() => Eq(query, "SELECT * FROM 'users' WHERE id = '5'"),
2626
),
2727
(
2828
"with rescript function, it should return a string with the correct interpolations",

0 commit comments

Comments
 (0)