diff options
author | Laria Carolin Chabowski <laria@laria.me> | 2020-05-01 21:58:22 +0200 |
---|---|---|
committer | Laria Carolin Chabowski <laria@laria.me> | 2020-05-01 21:58:22 +0200 |
commit | 4671f08fe05521d8f3d3d843f30576cb651ccd1b (patch) | |
tree | 71c46136c6f0dab787ce893fd481b9a600a5ed71 /tests/test_short_for_additional_attribs | |
parent | 565475db45aed717c80fa12418a90d04c7488582 (diff) | |
download | ste-4671f08fe05521d8f3d3d843f30576cb651ccd1b.tar.gz ste-4671f08fe05521d8f3d3d843f30576cb651ccd1b.tar.bz2 ste-4671f08fe05521d8f3d3d843f30576cb651ccd1b.zip |
Fix cutting off whitespace in tag content
Diffstat (limited to 'tests/test_short_for_additional_attribs')
-rw-r--r-- | tests/test_short_for_additional_attribs/.gitignore | 3 | ||||
-rw-r--r-- | tests/test_short_for_additional_attribs/code.php | 12 | ||||
-rw-r--r-- | tests/test_short_for_additional_attribs/test.tpl | 5 | ||||
-rw-r--r-- | tests/test_short_for_additional_attribs/want | 5 |
4 files changed, 25 insertions, 0 deletions
diff --git a/tests/test_short_for_additional_attribs/.gitignore b/tests/test_short_for_additional_attribs/.gitignore new file mode 100644 index 0000000..de2a41b --- /dev/null +++ b/tests/test_short_for_additional_attribs/.gitignore @@ -0,0 +1,3 @@ +have +*.ast +*.transc.php diff --git a/tests/test_short_for_additional_attribs/code.php b/tests/test_short_for_additional_attribs/code.php new file mode 100644 index 0000000..5d75d34 --- /dev/null +++ b/tests/test_short_for_additional_attribs/code.php @@ -0,0 +1,12 @@ +<?php + +use kch42\ste\STECore; + +function test_func(STECore $ste) +{ + $ste->set_var_by_name("data", array( + array('content' => 'foo', 'foo' => true), + array('content' => 'bar', 'foo' => false), + array('content' => 'baz', 'foo' => false), + )); +} diff --git a/tests/test_short_for_additional_attribs/test.tpl b/tests/test_short_for_additional_attribs/test.tpl new file mode 100644 index 0000000..e6b30e4 --- /dev/null +++ b/tests/test_short_for_additional_attribs/test.tpl @@ -0,0 +1,5 @@ +<ul> + <ste:foreach array="data" value="x"> + <li?{$x[foo]| class="foo"|}>$x[content]</li> + </ste:foreach> +</ul>
\ No newline at end of file diff --git a/tests/test_short_for_additional_attribs/want b/tests/test_short_for_additional_attribs/want new file mode 100644 index 0000000..c46d63f --- /dev/null +++ b/tests/test_short_for_additional_attribs/want @@ -0,0 +1,5 @@ +<ul> +<li class="foo">foo</li> +<li>bar</li> +<li>baz</li> +</ul> |