diff options
| author | Chris Smith <toonarmy@phpbb.com> | 2008-11-24 21:59:33 +0000 |
|---|---|---|
| committer | Chris Smith <toonarmy@phpbb.com> | 2008-11-24 21:59:33 +0000 |
| commit | 332521a3696df8e1504933bee5658d005549f3b4 (patch) | |
| tree | 28bb6252017cb568046517b4bfd4b9a9904aee0f /tests/template/templates | |
| parent | 9954d9c29f551acc0ad88bf4ecc806c51c764a6e (diff) | |
| download | forums-332521a3696df8e1504933bee5658d005549f3b4.tar forums-332521a3696df8e1504933bee5658d005549f3b4.tar.gz forums-332521a3696df8e1504933bee5658d005549f3b4.tar.bz2 forums-332521a3696df8e1504933bee5658d005549f3b4.tar.xz forums-332521a3696df8e1504933bee5658d005549f3b4.zip | |
- Make a start on completing the phpDoc comments for the template engine
- Tidy template engine code, mainly PHP5 stuff, made some methods void instead of just returning true
- Add tests for the remaining untested compilation code
git-svn-id: file:///svn/phpbb/trunk@9115 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'tests/template/templates')
| -rw-r--r-- | tests/template/templates/basic.html | 2 | ||||
| -rw-r--r-- | tests/template/templates/define.html | 24 | ||||
| -rw-r--r-- | tests/template/templates/expressions.html | 4 | ||||
| -rw-r--r-- | tests/template/templates/lang.html | 3 | ||||
| -rw-r--r-- | tests/template/templates/loop.html | 8 |
5 files changed, 39 insertions, 2 deletions
diff --git a/tests/template/templates/basic.html b/tests/template/templates/basic.html index 1a3fd5a96a..c1dd690260 100644 --- a/tests/template/templates/basic.html +++ b/tests/template/templates/basic.html @@ -16,3 +16,5 @@ fail <!-- BEGINELSE --> pass <!-- END empty --> + +<!-- DUMMY var --> diff --git a/tests/template/templates/define.html b/tests/template/templates/define.html index 94741e53fc..b9a2219a02 100644 --- a/tests/template/templates/define.html +++ b/tests/template/templates/define.html @@ -9,3 +9,27 @@ <!-- UNDEFINE $VALUE --> {$VALUE} + +<!-- DEFINE $VALUE --> + +<!-- BEGIN loop --> +<!-- DEFINE loop.$VALUE = loop.S_ROW_NUM --> +{loop.$VALUE} +<!-- UNDEFINE $VALUE --> +{loop.$VALUE} +<!-- UNDEFINE loop.$VALUE --> +{loop.$VALUE} + +<!-- END loop --> + +<!-- DEFINE test.deep.defines.$VALUE = 12 * 12 --> + +{test.deep.defines.$VALUE} + +<!-- UNDEFINE $VALUE --> + +{test.deep.defines.$VALUE} + +<!-- UNDEFINE test.deep.defines.$VALUE --> + +{test.deep.defines.$VALUE} diff --git a/tests/template/templates/expressions.html b/tests/template/templates/expressions.html index f0b38cc2ec..47a164e481 100644 --- a/tests/template/templates/expressions.html +++ b/tests/template/templates/expressions.html @@ -10,6 +10,8 @@ <!-- IF 32 is div by 16 -->pass<!-- ELSE -->fail<!-- ENDIF --> +<!-- IF 10 is not even -->fail<!-- ELSE -->pass<!-- ENDIF --> + <!-- IF 24 == 24 -->pass<!-- ELSE -->fail<!-- ENDIF --> <!-- IF 24 eq 24 -->pass<!-- ELSE -->fail<!-- ENDIF --> @@ -84,5 +86,3 @@ <!-- IF 6 % 4 == 2 -->pass<!-- ELSE -->fail<!-- ENDIF --> <!-- IF 24 mod 12 == 0 -->pass<!-- ELSE -->fail<!-- ENDIF --> - -<!-- IF not (43 > 53) -->pass<!-- ELSE -->fail<!-- ENDIF --> diff --git a/tests/template/templates/lang.html b/tests/template/templates/lang.html new file mode 100644 index 0000000000..2b5ea1cafe --- /dev/null +++ b/tests/template/templates/lang.html @@ -0,0 +1,3 @@ +{L_VARIABLE} + +{LA_VARIABLE} diff --git a/tests/template/templates/loop.html b/tests/template/templates/loop.html index 3912635e9d..f1e1bf7e53 100644 --- a/tests/template/templates/loop.html +++ b/tests/template/templates/loop.html @@ -13,3 +13,11 @@ noloop <!-- IF .loop == 2 --> loop <!-- ENDIF --> + +<!-- BEGIN loop --> +<!-- BEGIN !block --> + +loop#{loop.S_ROW_NUM}-block#{block.S_ROW_NUM} + +<!-- END !block --> +<!-- END loop --> |
