| 1 | fn test_escape() { |
| 2 | world := 'world!' |
| 3 | res := $tmpl('tmpl/escape.txt') |
| 4 | |
| 5 | assert res == 'Hello @world |
| 6 | Hello world! |
| 7 | Hello @ world! @ |
| 8 | ' |
| 9 | } |
| 10 | |
| 11 | fn test_keeps_at_in_html_urls() { |
| 12 | title := 'template ok' |
| 13 | res := $tmpl('at_in_url_template.html') |
| 14 | assert res.contains('https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.slim.min.js') |
| 15 | assert res.contains('https://unpkg.com/[email protected]') |
| 16 | assert res.contains('https://unpkg.com/[email protected]') |
| 17 | assert res.contains('<div>template ok</div>') |
| 18 | } |
| 19 | |