diff options
author | Urban Müller | 2017-10-16 18:22:27 +0200 |
---|---|---|
committer | Urban Müller | 2017-10-16 18:22:27 +0200 |
commit | 8d90e01b7ffa90519ce7393175ddd446c69fe84c (patch) | |
tree | e40cf9ac706c54c5e295d20bd172f3540d75b471 /tests | |
parent | c63ef15a33d671786ca7e3012b50ba1ad684cf92 (diff) | |
download | itools-8d90e01b7ffa90519ce7393175ddd446c69fe84c.tar.gz itools-8d90e01b7ffa90519ce7393175ddd446c69fe84c.tar.bz2 itools-8d90e01b7ffa90519ce7393175ddd446c69fe84c.zip |
allow simple functions calls in ET() and T() labels
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/autoprepend.t | 4 | ||||
-rwxr-xr-x | tests/it_text.t | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/tests/autoprepend.t b/tests/autoprepend.t index bf40605..01da49e 100755 --- a/tests/autoprepend.t +++ b/tests/autoprepend.t @@ -9,13 +9,13 @@ $GLOBALS['it_text']->statictext = array( is( T('foo'), - "bar {v1}", + "bar ", "simple T()" ); is( T('foo', 'en'), - "qux {v1}", + "qux ", "simple T() with language" ); diff --git a/tests/it_text.t b/tests/it_text.t index bc4d5c0..5629d51 100755 --- a/tests/it_text.t +++ b/tests/it_text.t @@ -16,3 +16,6 @@ is(it_text::transmogrify("X{foo}{bar}", array('foo' => 1, 'bar' => 2)), "X12"); is(it_text::transmogrify("X{foo}", array('foo' => "&")), "X&"); is(it_text::transmogrify("X{x}", $obj), "Xattr"); is(it_text::transmogrify("X{y.z}", $obj), "Xattr"); +is(it_text::transmogrify("{mb_strlen(xxx)}", null, null, ['mb_strlen' => 1]), "3"); +is(it_text::transmogrify("{it::ucfirst(xxx)}", null, null, ['it::ucfirst' => 1]), "Xxx"); +is(it_text::transmogrify("{format violation}"), '{format violation}'); |