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

pull/7234/head
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
1 changed files with 6 additions and 1 deletions

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'
} }