From 2135a5b3f66b5788a218a0fbd14cae6bdd728124 Mon Sep 17 00:00:00 2001 From: Ulf Wendel Date: Thu, 12 Jul 2007 14:23:56 +0000 Subject: [PATCH] Whoever has hacked this function into ext/mysql, here's a "test" for it. --- ext/mysql/tests/mysql_set_charset.phpt | 58 ++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 ext/mysql/tests/mysql_set_charset.phpt diff --git a/ext/mysql/tests/mysql_set_charset.phpt b/ext/mysql/tests/mysql_set_charset.phpt new file mode 100644 index 0000000000..8ccdbabcce --- /dev/null +++ b/ext/mysql/tests/mysql_set_charset.phpt @@ -0,0 +1,58 @@ +--TEST-- +mysql_set_charset() - STUB, function usage not recommended +--SKIPIF-- + +--FILE-- + $charset) { + if (!($res = mysql_query(sprintf('SHOW CHARACTER SET LIKE "%s"', $charset), $link))) + continue; + mysql_free_result($res); + if ($expect !== ($tmp = @mysql_set_charset($charset, $link))) + printf("[006] Expecting %s/%s got %s/%s\n", + gettype($expect), $expect, + gettype($tmp), $tmp); +} + +mysql_close($link); +print "done!"; +?> +--EXPECTF-- +done! +--UEXPECTF-- +Warning: mysql_set_charset(): Character set %s is not supported when running PHP with unicode.semantics=On. in %s on line %d +done! \ No newline at end of file -- 2.50.1