@SUB(CMS test page)
IF $(if x,TRUE,FALSE)
EQ $(eq abc,abc,abc)
NE $(ne abc,abc,aBc)
AND $(and a,b,c)
OR $(or ,,c,d,)
NOT $(not a)
NOT $(not )
STRIP $(strip aaa , bbb )
SANITIZE $(sanitize x1%2y, z3\)3)
FILE_EXISTS $(file_exists /cms.css)
FILE_EXISTS $(file_exists /none)
FILE_EXISTS $(file_exists /none, no file)
Variables:
$__DUMPVARS__
Unit tests:
$(assert a)
$(assert $(not ), $(not $(not x)))
$(assert $(if a,b), $(if a,b,))
$(assert $(if ,,c))
$(assert $(not $(if a,,c)))
$(assert $(not $(if ,b)), $(not $(if ,b,)))
$(assert $(eq xyz, xyz), $(eq $(eq abc,abc),abc))
$(assert $(ne abc,aBc), $(eq $(ne abc, aBc), aBc))
$(assert $(and a,b,c), $(eq $(and a,b,c),a), $(not $(and a,,c)))
$(assert $(or ,b,,,,), $(eq $(or ,b,,,,),b), $(not $(or )))
$(assert $(eq $(strip foo bar ),foo bar))
$(assert $(eq $(sanitize ___ab*+ef+),ab_ef))
$(assert $(file_exists /), $(eq $(file_exists /),/))
passed.
@ENDSUB()