From 52c4896f76c24094c26e46d4bbe39b456f004752 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bicz=C3=B3k=20M=C3=A1rton?= Date: Thu, 24 Aug 2023 14:56:10 +0200 Subject: [PATCH] [ArkTs] Add missing main function Added main function to spec_example.ets test. This patch fixes #13257. Signed-off-by: Marton Biczok --- .../09.literals/05.template_literals/spec_example.ets | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/ets/tests/ets-templates/02.lexical_elements/09.literals/05.template_literals/spec_example.ets b/plugins/ets/tests/ets-templates/02.lexical_elements/09.literals/05.template_literals/spec_example.ets index 45211a1eb..244e89fce 100644 --- a/plugins/ets/tests/ets-templates/02.lexical_elements/09.literals/05.template_literals/spec_example.ets +++ b/plugins/ets/tests/ets-templates/02.lexical_elements/09.literals/05.template_literals/spec_example.ets @@ -2,5 +2,11 @@ desc: Multi-line string literals that can include embedded expressions are called Template literals ---*/ -let sentence = `This is an example of multi-line string, +function main():void { + let sentence = `This is an example of multi-line string, which should be enclosed in backticks (\`)` + + let sentence2 = "This is an example of multi-line string,\n which should be enclosed in backticks (\\`)" + + assert sentence==sentence2 +} -- Gitee