From f8369d7d6e37248d6523fdac6e1d760fca4f1b52 Mon Sep 17 00:00:00 2001 From: Tobias Sarnowski Date: Wed, 18 Apr 2012 12:08:28 +0200 Subject: moved _testing to _test --- _test/tests/inc/utf8_substr.test.php | 43 ++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 _test/tests/inc/utf8_substr.test.php (limited to '_test/tests/inc/utf8_substr.test.php') diff --git a/_test/tests/inc/utf8_substr.test.php b/_test/tests/inc/utf8_substr.test.php new file mode 100644 index 000000000..19eea4eb4 --- /dev/null +++ b/_test/tests/inc/utf8_substr.test.php @@ -0,0 +1,43 @@ +assertEquals(utf8_substr($test[0],$test[1],$test[2]),$test[3]); + } + } + + function test2_bug891() { + // we test multiple cases here - format: in, offset, length, out + $tests = array(); + + $str = str_repeat('в',66000).'@@'; + $tests[] = array($str, 65600, 1, 'в'); + $tests[] = array($str,0,66002,$str); + + foreach($tests as $test){ + $this->assertEquals(utf8_substr($test[0],$test[1],$test[2]),$test[3]); + } + } + +} +//Setup VIM: ex: et ts=4 : -- cgit v1.2.3 From 050f8f4ddc32167e205a190eec9a60ad8f3caed5 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Tue, 1 May 2012 22:58:57 +0200 Subject: removed unecessary requiresin unit tests --- _test/tests/inc/utf8_substr.test.php | 1 - 1 file changed, 1 deletion(-) (limited to '_test/tests/inc/utf8_substr.test.php') diff --git a/_test/tests/inc/utf8_substr.test.php b/_test/tests/inc/utf8_substr.test.php index 19eea4eb4..758e8c9d4 100644 --- a/_test/tests/inc/utf8_substr.test.php +++ b/_test/tests/inc/utf8_substr.test.php @@ -1,7 +1,6 @@