<?php global $th; if (!isset($th)) { require_once dirname(dirname(__DIR__)) . '/src/TestHelper.class.php'; $th = new rkphplib\TestHelper(); } $th->runTokenizer(15, array('TBase'));
<?php global $th; if (!isset($th)) { require_once dirname(dirname(__DIR__)) . '/src/TestHelper.class.php'; $th = new rkphplib\TestHelper(); } require_once dirname(dirname(__DIR__)) . '/src/Tokenizer.class.php'; $tx = new rkphplib\Tokenizer(); $th->compare('escape', [$tx->escape('abc efg'), $tx->escape('a{b}c'), $tx->escape('{:=c} {x:} {aa:bb} {:aa}')], ['abc efg', 'a{b}c', '{:=c} {x:} {aa:bb} {:aa}']); $th->compare('unescape', [$tx->unescape('abc efg'), $tx->unescape('a{b}c'), $tx->unescape('{:=c} {x:} {aa:bb} {:aa}')], ['abc efg', 'a{b}c', '{:=c} {x:} {aa:bb} {:aa}']); $th->runTokenizer(1, array());