summaryrefslogtreecommitdiff
path: root/ext/mbstring/tests/simpletest.phpt
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2013-03-14 05:42:27 +0000
committer <>2013-04-03 16:25:08 +0000
commitc4dd7a1a684490673e25aaf4fabec5df138854c4 (patch)
tree4d57c44caae4480efff02b90b9be86f44bf25409 /ext/mbstring/tests/simpletest.phpt
downloadphp2-master.tar.gz
Imported from /home/lorry/working-area/delta_php2/php-5.4.13.tar.bz2.HEADphp-5.4.13master
Diffstat (limited to 'ext/mbstring/tests/simpletest.phpt')
-rw-r--r--ext/mbstring/tests/simpletest.phpt34
1 files changed, 34 insertions, 0 deletions
diff --git a/ext/mbstring/tests/simpletest.phpt b/ext/mbstring/tests/simpletest.phpt
new file mode 100644
index 0000000..80b2f72
--- /dev/null
+++ b/ext/mbstring/tests/simpletest.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Simple multi-byte print test (EUC-JP)
+--SKIPIF--
+<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
+--INI--
+output_handler=
+--FILE--
+<?php
+/*
+ * Test basic PHP functions to check if it works with multi-byte chars
+ */
+
+// EUC-JP strings
+$s1 = "マルチバイト関数が使えます。";
+$s2 = "この文字が連結されているはず。";
+
+// print directly
+echo "echo: ".$s1.$s2."\n";
+print("print: ".$s1.$s2."\n");
+printf("printf: %s%s\n",$s1, $s2);
+echo sprintf("sprintf: %s%s\n",$s1, $s2);
+
+// Assign to var
+$s3 = $s1.$s2."\n";
+echo "echo: ".$s3;
+
+?>
+--EXPECT--
+echo: マルチバイト関数が使えます。この文字が連結されているはず。
+print: マルチバイト関数が使えます。この文字が連結されているはず。
+printf: マルチバイト関数が使えます。この文字が連結されているはず。
+sprintf: マルチバイト関数が使えます。この文字が連結されているはず。
+echo: マルチバイト関数が使えます。この文字が連結されているはず。
+