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:
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
Block a user