From f76df0ba1b641b19ff85e05bb8d19c71a5be28aa Mon Sep 17 00:00:00 2001 From: Moriyoshi Koizumi Date: Fri, 3 Jan 2003 05:48:51 +0000 Subject: [PATCH] Added test cases for iconv_strlen() and iconv_substr() --- ext/iconv/tests/iconv_strlen.phpt | 19 ++++++++++ ext/iconv/tests/iconv_substr.phpt | 59 +++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 ext/iconv/tests/iconv_strlen.phpt create mode 100644 ext/iconv/tests/iconv_substr.phpt diff --git a/ext/iconv/tests/iconv_strlen.phpt b/ext/iconv/tests/iconv_strlen.phpt new file mode 100644 index 0000000000..2c815f4f31 --- /dev/null +++ b/ext/iconv/tests/iconv_strlen.phpt @@ -0,0 +1,19 @@ +--TEST-- +iconv_strlen() +--SKIPIF-- + +--FILE-- + +--EXPECT-- +int(3) +int(3) +int(13) +int(10) diff --git a/ext/iconv/tests/iconv_substr.phpt b/ext/iconv/tests/iconv_substr.phpt new file mode 100644 index 0000000000..efa746e6de --- /dev/null +++ b/ext/iconv/tests/iconv_substr.phpt @@ -0,0 +1,59 @@ +--TEST-- +iconv_substr() +--SKIPIF-- + +--INI-- +iconv.internal_charset=ISO-8859-1 +--FILE-- + +--EXPECT-- +666768696a6b6c +666768696a6b6c +a6a4a8a4aaa4ab +a4aba4ada4afa4b1a4b3a4b5a4b7 +bool(false) +string(0) "" +string(14) "This is a test" +string(14) "This is a test" +string(3) "est" +string(3) "est" +string(5) "This " +string(5) "This " +string(0) "" +string(0) "" +string(0) "" +string(0) "" +string(10) "¤Á¤Ï ISO-2" -- 2.50.1