cvs: php-src /ext/standard/tests/strings moneyformat.phpt
| From: | Stanislav Malyshev | Date: | Wed, 06 Jun 2007 17:13:18 +0000 |
| Subject: | cvs: php-src /ext/standard/tests/strings moneyformat.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-44691@lists.php.net to get a copy of this message | ||
stas Wed Jun 6 17:13:18 2007 UTC
Modified files:
/php-src/ext/standard/tests/strings moneyformat.phpt
Log:
add moneyformat test
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/moneyformat.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/standard/tests/strings/moneyformat.phpt
diff -u /dev/null php-src/ext/standard/tests/strings/moneyformat.phpt:1.2
--- /dev/null Wed Jun 6 17:13:18 2007
+++ php-src/ext/standard/tests/strings/moneyformat.phpt Wed Jun 6 17:13:18 2007
@@ -0,0 +1,19 @@
+--TEST--
+money_format test
+--SKIPIF--
+<?php
+ if (!function_exists('money_format') || !function_exists('setlocale')) {
+ die("SKIP money_format - not supported\n");
+ }
+?>
+--FILE--
+<?php
+setlocale(LC_MONETARY, 'en_US');
+var_dump( money_format("X%nY", 3.1415));
+var_dump(money_format("AAAAA%n%n%n%n", NULL));
+?>
+--EXPECTF--
+string(7) "X$3.14Y"
+
+Warning: money_format(): Only a single %%i or %%n token can be used in %s on line %d
+bool(false)