mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vfmt: change all '$expr' to '${expr}' (#16428)
This commit is contained in:
@ -25,7 +25,7 @@ fn test_giant_string() {
|
||||
mut parser := Parser{}
|
||||
temp_html.write_string('<!doctype html><html><head><title>Giant String</title></head><body>')
|
||||
for counter := 0; counter < 2000; counter++ {
|
||||
temp_html.write_string("<div id='name_$counter' class='several-$counter'>Look at $counter</div>")
|
||||
temp_html.write_string("<div id='name_${counter}' class='several-${counter}'>Look at ${counter}</div>")
|
||||
}
|
||||
temp_html.write_string('</body></html>')
|
||||
parser.parse_html(temp_html.str())
|
||||
@ -35,7 +35,7 @@ fn test_giant_string() {
|
||||
fn test_script_tag() {
|
||||
mut parser := Parser{}
|
||||
script_content := "\nvar googletag = googletag || {};\ngoogletag.cmd = googletag.cmd || [];if(3 > 5) {console.log('Birl');}\n"
|
||||
temp_html := '<html><body><script>$script_content</script></body></html>'
|
||||
temp_html := '<html><body><script>${script_content}</script></body></html>'
|
||||
parser.parse_html(temp_html)
|
||||
assert parser.tags[2].content.len == script_content.replace('\n', '').len
|
||||
}
|
||||
|
Reference in New Issue
Block a user