nlopess         Sun May  7 18:11:40 2006 UTC

  Added files:                 
    /php-src/ext/tidy/tests     021.phpt 

  Modified files:              
    /php-src/ext/tidy   tidy.c 
    /php-src/ext/tidy/tests     007.phpt 
  Log:
  convert a few more functions to unicode and adapt the tests as well
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/tidy/tidy.c?r1=1.84&r2=1.85&diff_format=u
Index: php-src/ext/tidy/tidy.c
diff -u php-src/ext/tidy/tidy.c:1.84 php-src/ext/tidy/tidy.c:1.85
--- php-src/ext/tidy/tidy.c:1.84        Sat May  6 13:19:10 2006
+++ php-src/ext/tidy/tidy.c     Sun May  7 18:11:40 2006
@@ -16,7 +16,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: tidy.c,v 1.84 2006/05/06 13:19:10 nlopess Exp $ */
+/* $Id: tidy.c,v 1.85 2006/05/07 18:11:40 nlopess Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -998,7 +998,7 @@
        php_info_print_table_start();
        php_info_print_table_header(2, "Tidy support", "enabled");
        php_info_print_table_row(2, "libTidy Release", (char 
*)tidyReleaseDate());
-       php_info_print_table_row(2, "Extension Version", 
PHP_TIDY_MODULE_VERSION " ($Id: tidy.c,v 1.84 2006/05/06 13:19:10 nlopess Exp 
$)");
+       php_info_print_table_row(2, "Extension Version", 
PHP_TIDY_MODULE_VERSION " ($Id: tidy.c,v 1.85 2006/05/07 18:11:40 nlopess Exp 
$)");
        php_info_print_table_end();
 
        DISPLAY_INI_ENTRIES();
@@ -1220,7 +1220,7 @@
 
 
 #if HAVE_TIDYOPTGETDOC
-/* {{{ proto string tidy_get_opt_doc(tidy resource, string optname)
+/* {{{ proto string tidy_get_opt_doc(tidy resource, string optname) U
    Returns the documentation for the given option name */
 PHP_FUNCTION(tidy_get_opt_doc)
 {
@@ -1251,7 +1251,7 @@
        }
 
        if ( (optval = (char *) tidyOptGetDoc(obj->ptdoc->doc, opt)) ) {
-               RETURN_STRING(optval, 1);
+               RETURN_ASCII_STRING(optval, 1);
        }
 
        RETURN_FALSE;
@@ -1260,8 +1260,8 @@
 #endif
 
 
-/* {{{ proto array tidy_get_config()
-   Get current Tidy configuarion */
+/* {{{ proto array tidy_get_config() U
+   Get current Tidy configuration */
 PHP_FUNCTION(tidy_get_config)
 {
        TidyIterator itOpt;
@@ -1282,7 +1282,7 @@
                opt_value = php_tidy_get_opt_val(obj->ptdoc, opt, &optt 
TSRMLS_CC);
                switch (optt) {
                        case TidyString:
-                               add_assoc_string(return_value, opt_name, 
(char*)opt_value, 0);
+                               add_assoc_ascii_string(return_value, opt_name, 
(char*)opt_value, 0);
                                break;
 
                        case TidyInteger:
@@ -1414,7 +1414,7 @@
        optval = php_tidy_get_opt_val(obj->ptdoc, opt, &optt TSRMLS_CC);
        switch (optt) {
                case TidyString:
-                       RETURN_STRING((char *)optval, 0);
+                       RETURN_ASCII_STRING((char *)optval, 0);
                        break;
 
                case TidyInteger:
http://cvs.php.net/viewcvs.cgi/php-src/ext/tidy/tests/007.phpt?r1=1.9&r2=1.10&diff_format=u
Index: php-src/ext/tidy/tests/007.phpt
diff -u php-src/ext/tidy/tests/007.phpt:1.9 php-src/ext/tidy/tests/007.phpt:1.10
--- php-src/ext/tidy/tests/007.phpt:1.9 Mon Nov 22 15:12:32 2004
+++ php-src/ext/tidy/tests/007.phpt     Sun May  7 18:11:40 2006
@@ -19,3 +19,7 @@
 Current Value of 'tidy-mark': bool(false)
 Current Value of 'error-file': string(0) ""
 Current Value of 'tab-size': int(8)
+--UEXPECT--
+Current Value of 'tidy-mark': bool(false)
+Current Value of 'error-file': unicode(0) ""
+Current Value of 'tab-size': int(8)

http://cvs.php.net/viewcvs.cgi/php-src/ext/tidy/tests/021.phpt?view=markup&rev=1.1
Index: php-src/ext/tidy/tests/021.phpt
+++ php-src/ext/tidy/tests/021.phpt
--TEST--
tidy_get_opt_doc()
--SKIPIF--
<?php if (!extension_loaded("tidy") || !function_exists('tidy_get_opt_doc')) 
print "skip"; ?>
--FILE--
<?php

var_dump(tidy_get_opt_doc(new tidy, 'some_bogus_cfg'));

$t = new tidy;
var_dump($t->getOptDoc('ncr'));
var_dump(strlen(tidy_get_opt_doc($t, 'wrap')) > 99);
?>
--EXPECT--
Warning: tidy_get_opt_doc(): Unknown Tidy Configuration Option 'some_bogus_cfg' 
in /cvs/php-src/ext/tidy/tests/021.php on line 3
bool(false)
string(73) "This option specifies if Tidy should allow numeric character 
references. "
bool(true)
--UEXPECT--
Warning: tidy_get_opt_doc(): Unknown Tidy Configuration Option 'some_bogus_cfg' 
in /cvs/php-src/ext/tidy/tests/021.php on line 3
bool(false)
unicode(73) "This option specifies if Tidy should allow numeric character 
references. "
bool(true)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to