File: test_expr5.tmpl

package info (click to toggle)
libhtml-template-pro-perl 0.9524-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,512 kB
  • sloc: ansic: 1,841; perl: 1,474; yacc: 404; pascal: 118; makefile: 6
file content (25 lines) | stat: -rw-r--r-- 744 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<HTML><BODY>
<H1> test on string compare </H1>
true:<TMPL_VAR EXPR="'abc' eq 'abc'">
false:<TMPL_VAR EXPR="'ab' eq 'abc'">
false:<TMPL_VAR EXPR="'def' eq 'abc'">

false:<TMPL_VAR EXPR="ONE eq TWO">
false:<TMPL_VAR EXPR="(ONE eq TWO)">

false:<TMPL_VAR EXPR="1 eq 2">
false:<TMPL_VAR EXPR="'1' eq 2">
false:<TMPL_VAR EXPR="2 eq '1'">

testing unescape string
false:<TMPL_VAR EXPR="'\'1' eq '\'2'">
true:<TMPL_VAR EXPR="'\'1' ne '\'2'">

<tmpl_if expr="(EMPTYSTR eq SystemRequest_MainNavigationSelection)">bad<tmpl_else>good</tmpl_if>
<tmpl_if expr="(EMPTYSTR eq '')">good<tmpl_else>bad</tmpl_if>
true:<TMPL_VAR EXPR="'a' ge ''">
true:<TMPL_VAR EXPR="'a' gt ''">
true:<TMPL_VAR EXPR="'a' le ''">
false:<TMPL_VAR EXPR="'a' lt ''">

</body></html>