diff options
-rw-r--r-- | tests/template/template.php | 7 | ||||
-rw-r--r-- | tests/template/templates/loop_expressions.html | 11 |
2 files changed, 18 insertions, 0 deletions
diff --git a/tests/template/template.php b/tests/template/template.php index 72ad065acf..89de67a453 100644 --- a/tests/template/template.php +++ b/tests/template/template.php @@ -203,6 +203,13 @@ class phpbb_template_template_test extends phpbb_test_case array('loop.inner'), "first\n0\n0\n2\nx\nset\n1\n1\n2\ny\nset\nlast", ), + array( + 'loop_expressions.html', + array(), + array('loop' => array(array(), array(), array(), array(), array(), array(), array(), array(), array(), array(), array(), array())), + array(), + "on\non\non\non\noff\noff\noff\noff\non\non\non\non\n\noff\noff\noff\non\non\non\noff\noff\noff\non\non\non", + ), ); } diff --git a/tests/template/templates/loop_expressions.html b/tests/template/templates/loop_expressions.html new file mode 100644 index 0000000000..6bff53f388 --- /dev/null +++ b/tests/template/templates/loop_expressions.html @@ -0,0 +1,11 @@ +<!-- BEGIN loop --> + +<!-- IF loop.S_ROW_NUM is even by 4 -->on<!-- ELSE -->off<!-- ENDIF --> + +<!-- END loop --> + +<!-- BEGIN loop --> + +<!-- IF loop.S_ROW_NUM is odd by 3 -->on<!-- ELSE -->off<!-- ENDIF --> + +<!-- END loop --> |