From ca39a9a1a9d7e82d0e9220acaf91f43ab391acc3 Mon Sep 17 00:00:00 2001 From: yuyi Date: Thu, 10 Dec 2020 17:20:42 +0800 Subject: [PATCH] test: add more embed string interpolation tests (#7229) --- vlib/v/tests/string_interpolation_string_args_test.v | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/vlib/v/tests/string_interpolation_string_args_test.v b/vlib/v/tests/string_interpolation_string_args_test.v index 267d91be41..a1c28e9864 100644 --- a/vlib/v/tests/string_interpolation_string_args_test.v +++ b/vlib/v/tests/string_interpolation_string_args_test.v @@ -4,6 +4,11 @@ fn show_info(a string) string { fn test_interpolation_string_args() { assert '${show_info("abc")}' == 'abc' - assert '${show_info("bac")}' == 'bac' + assert '${show_info('abc')}' == 'abc' + + assert '1_${show_info("aaa")} 2_${show_info("bbb")}' == '1_aaa 2_bbb' + assert '1_${show_info('aaa')} 2_${show_info('bbb')}' == '1_aaa 2_bbb' + assert '${"aaa"}' == 'aaa' + assert '${'aaa'}' == 'aaa' }