diff options
author | Ciprian Dorin Craciun <ciprian@volution.ro> | 2020-05-25 16:32:32 +0300 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2020-06-30 14:12:50 +0200 |
commit | af2fd0b8dc0894fdb96656351bf2015d4df73813 (patch) | |
tree | 1697a641ce1670cf0959a09319c0ba049ed1ae3b /testing/templates | |
parent | e71e6806496027089b5c3f0dd764bebe9abbf735 (diff) | |
download | askama-af2fd0b8dc0894fdb96656351bf2015d4df73813.tar.gz askama-af2fd0b8dc0894fdb96656351bf2015d4df73813.tar.bz2 askama-af2fd0b8dc0894fdb96656351bf2015d4df73813.zip |
Add tests for allow whitespaces patch
Diffstat (limited to 'testing/templates')
-rw-r--r-- | testing/templates/allow-whitespaces.html | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/testing/templates/allow-whitespaces.html b/testing/templates/allow-whitespaces.html new file mode 100644 index 0000000..80f7ecd --- /dev/null +++ b/testing/templates/allow-whitespaces.html @@ -0,0 +1,63 @@ + +{{ tuple.0 }} +{{ tuple .1 }} +{{ tuple. 2 }} +{{ tuple . 3 }} +{% let ( t0 , t1 , t2 , t3 , ) = tuple %} + +{{ string }} +{{ string.len( ) }} +{{ string . len () }} +{{ string . len () }} +{{ string. len () }} +{{ string . len ( ) }} + +{{ nested_1 . nested_2 . array [0] }} +{{ nested_1 .nested_2. array [ 1 ] }} +{{ nested_1 .nested_2. hash [ "key" ] }} + +{% let array = nested_1.nested_2.array %} +{# +{% let array = nested_1.nested_2.array %} +{% let array = nested_1 . nested_2 . array %} +#} +{# +{% let hash = &nested_1.nested_2.hash %} +#} + +{{ array| json }} +{{ array[..]| json }}{{ array [ .. ]| json }} +{{ array[1..2]| json }}{{ array [ 1 .. 2 ]| json }} +{{ array[1..=2]| json }}{{ array [ 1 ..= 2 ]| json }} +{{ array[(0+1)..(3-2)]| json }}{{ array [ ( 0 + 1 ) .. ( 3 - 2 ) ]| json }} + +{{-1}}{{ -1 }}{{ - 1 }} +{{1+2}}{{ 1+2 }}{{ 1 +2 }}{{ 1+ 2 }} {{ 1 + 2 }} +{{1*2}}{{ 1*2 }}{{ 1 *2 }}{{ 1* 2 }} {{ 1 * 2 }} +{{1&2}}{{ 1&2 }}{{ 1 &2 }}{{ 1& 2 }} {{ 1 & 2 }} +{{1|2}}{{ 1|2 }}{{ 1 |2 }}{{ 1| 2 }} {{ 1 | 2 }} + +{{true}}{{false}} +{{!true}}{{ !true }}{{ ! true }} +{# +{{true&&false}}{{ true&&false }}{{ true &&false }}{{ true&& false }} {{ true && false }} +{{true||false}}{{ true||false }}{{ true ||false }}{{ true|| false }} {{ true || false }} +#} + +{{ self.f0() }}{{ self.f0 () }}{{ self.f0 ( ) }} +{{ self.f1("1") }}{{ self.f1 ( "1" ) }}{{ self.f1 ( "1" ) }} +{{ self.f2("1","2") }}{{ self.f2 ( "1" ,"2" ) }}{{ self.f2 ( "1" , "2" ) }} + +{% for s in 0..5 %}{% endfor %} +{% for s in 0 .. 5 %}{% endfor %} + +{% match option %} +{% when Option :: Some with ( option ) %} +{% when std :: option :: Option :: None %} +{% endmatch %} + +{{ std::string::String::new () }} +{# +{{ ::std::string::String::new () }} +#} + |