1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

test: add more embed string interpolation tests (#7229)

This commit is contained in:
yuyi 2020-12-10 17:20:42 +08:00 committed by GitHub
parent a38fe4fca9
commit ca39a9a1a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,6 +4,11 @@ fn show_info(a string) string {
fn test_interpolation_string_args() { fn test_interpolation_string_args() {
assert '${show_info("abc")}' == 'abc' 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'
assert '${'aaa'}' == 'aaa'
} }