test: add more embed string interpolation tests (#7229)
parent
a38fe4fca9
commit
ca39a9a1a9
|
@ -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'
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue