tony2001 Tue Jul 11 16:32:48 2006 UTC Added files: /php-src/ext/xmlwriter 010.phpt
Modified files: /php-src/ext/xmlwriter php_xmlwriter.c Log: fix typo add test with error messages http://cvs.php.net/viewvc.cgi/php-src/ext/xmlwriter/php_xmlwriter.c?r1=1.35&r2=1.36&diff_format=u Index: php-src/ext/xmlwriter/php_xmlwriter.c diff -u php-src/ext/xmlwriter/php_xmlwriter.c:1.35 php-src/ext/xmlwriter/php_xmlwriter.c:1.36 --- php-src/ext/xmlwriter/php_xmlwriter.c:1.35 Mon Jun 5 12:20:08 2006 +++ php-src/ext/xmlwriter/php_xmlwriter.c Tue Jul 11 16:32:47 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_xmlwriter.c,v 1.35 2006/06/05 12:20:08 helly Exp $ */ +/* $Id: php_xmlwriter.c,v 1.36 2006/07/11 16:32:47 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -116,7 +116,7 @@ #define XMLW_NAME_CHK(__err) \ if (xmlValidateName((xmlChar *) name, 0) != 0) { \ - php_error_docref(NULL TSRMLS_CC, E_WARNING, #__err); \ + php_error_docref(NULL TSRMLS_CC, E_WARNING, __err); \ RETURN_FALSE; \ } \ http://cvs.php.net/viewvc.cgi/php-src/ext/xmlwriter/010.phpt?view=markup&rev=1.1 Index: php-src/ext/xmlwriter/010.phpt +++ php-src/ext/xmlwriter/010.phpt --TEST-- xmlwriter_start/end_attribute() --FILE-- <?php $file = dirname(__FILE__).'/010.tmp'; $xw = xmlwriter_open_uri($file); var_dump(xmlwriter_start_element($xw, "tag")); var_dump(xmlwriter_start_attribute($xw, "attr")); var_dump(xmlwriter_end_attribute($xw)); var_dump(xmlwriter_start_attribute($xw, "-1")); var_dump(xmlwriter_end_attribute($xw)); var_dump(xmlwriter_start_attribute($xw, "\"")); var_dump(xmlwriter_end_attribute($xw)); var_dump(xmlwriter_end_element($xw)); unset($xw); var_dump(file_get_contents($file)); @unlink($file); echo "Done\n"; ?> --EXPECTF-- bool(true) bool(true) bool(true) Warning: xmlwriter_start_attribute(): Invalid Attribute Name in %s on line %d bool(false) bool(false) Warning: xmlwriter_start_attribute(): Invalid Attribute Name in %s on line %d bool(false) bool(false) bool(true) string(14) "<tag attr=""/>" Done -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php