diff options
author | Andreas Gohr <andi@splitbrain.org> | 2010-10-27 20:53:59 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2010-10-27 20:53:59 +0200 |
commit | 55b3c9e8ad80fc80ec9ecaac33474e186cb88ee8 (patch) | |
tree | 1bf1359fee6044a704ac8465753e3c147d61e6e3 /_test | |
parent | e8b9cf5ae263f3b97aaa389dddd9e7458cc0894c (diff) | |
parent | baef77a2b52933a6dd7caf3f641ff5ce6e6164f3 (diff) | |
download | rpg-55b3c9e8ad80fc80ec9ecaac33474e186cb88ee8.tar.gz rpg-55b3c9e8ad80fc80ec9ecaac33474e186cb88ee8.tar.bz2 |
Merge branch 'master' into stable
Diffstat (limited to '_test')
-rw-r--r-- | _test/cases/inc/common_pagetemplate.test.php | 19 | ||||
-rw-r--r-- | _test/cases/inc/safefn.test.php | 6 |
2 files changed, 23 insertions, 2 deletions
diff --git a/_test/cases/inc/common_pagetemplate.test.php b/_test/cases/inc/common_pagetemplate.test.php new file mode 100644 index 000000000..ecba0f966 --- /dev/null +++ b/_test/cases/inc/common_pagetemplate.test.php @@ -0,0 +1,19 @@ +<?php + +require_once DOKU_INC.'inc/common.php'; + +class common_pagetemplate_test extends UnitTestCase { + + function test_none(){ + global $conf; + $conf['sepchar'] = '-'; + $data = array( + 'id' => 'page-id-long', + 'tpl' => '"@PAGE@" "@!PAGE@" "@!!PAGE@" "@!PAGE!@"', + ); + $old = error_reporting(E_ALL & ~E_NOTICE); + $this->assertEqual(parsePageTemplate($data), '"page id long" "Page id long" "Page Id Long" "PAGE ID LONG"'); + error_reporting($old); + } +} +//Setup VIM: ex: et ts=4 enc=utf-8 : diff --git a/_test/cases/inc/safefn.test.php b/_test/cases/inc/safefn.test.php index fb0d812d7..b93914bf8 100644 --- a/_test/cases/inc/safefn.test.php +++ b/_test/cases/inc/safefn.test.php @@ -10,6 +10,8 @@ class safeFN_test extends UnitTestCase { function test1(){ // we test multiple cases here - format: string, repl, additional, test $tests = array(); + $tests[] = array('äa.txt', '%5g.a.txt'); + $tests[] = array('ä.', '%5g..'); $tests[] = array('asciistring','asciistring'); $tests[] = array('ascii-_/.string','ascii-_/.string'); $tests[] = array('AName','%x%1a.ame'); @@ -18,8 +20,8 @@ class safeFN_test extends UnitTestCase { $tests[] = array('Aß∂ƒName','%x%5b%6oy%aa%1a.ame'); $tests[] = array('A%ß-∂_.ƒName','%x%%5b.-%6oy._.%aa%1a.ame'); $tests[] = array('A%%ß-∂_.ƒName','%x%%%5b.-%6oy._.%aa%1a.ame'); - $tests[] = array('데이터도 함께 복원됩니다. 강력한','%zf4%13dg%15ao%zhg%0%164o%yig%0%11at%138w%zk9%zag%zb8..%0%xyt%10cl%164c'); - $tests[] = array('совместимая','%td%ta%sy%t8%t1%td%te%t4%t8%sw%tr'); + $tests[] = array('데이터도 함께 복원됩니다. 강력한','%zf4%13dg%15ao%zhg%0%164o%yig%0%11at%138w%zk9%zag%zb8..%0%xyt%10cl%164c.'); + $tests[] = array('совместимая','%td%ta%sy%t8%t1%td%te%t4%t8%sw%tr.'); $tests[] = array('нехватка_файлового_пространства_на_сервере_p0-squid.some.domain.1270211897.txt.gz','%t9%t1%th%sy%sw%te%t6%sw._%tg%sw%t5%t7%ta%sy%ta%sz%ta._%tb%tc%ta%td%te%tc%sw%t9%td%te%sy%sw._%t9%sw._%td%t1%tc%sy%t1%tc%t1._p0-squid.some.domain.1270211897.txt.gz'); foreach($tests as $test){ |