Author: suokko
Date: Tue Aug 19 11:47:42 2008
New Revision: 28764

URL: http://svn.gna.org/viewcvs/wesnoth?rev=28764&view=rev
Log:
* Fixed warnings to be vissible when build was succesfull.
* Made test error message be escaped if there is newlines or quotes

Modified:
    branches/resources/tests.wesnoth.org/include/Build.php
    branches/resources/tests.wesnoth.org/include/TestError.php
    
branches/resources/tests.wesnoth.org/smarty_workdir/plugins/modifier.autohide.php

Modified: branches/resources/tests.wesnoth.org/include/Build.php
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/resources/tests.wesnoth.org/include/Build.php?rev=28764&r1=28763&r2=28764&view=diff
==============================================================================
--- branches/resources/tests.wesnoth.org/include/Build.php (original)
+++ branches/resources/tests.wesnoth.org/include/Build.php Tue Aug 19 11:47:42 
2008
@@ -310,8 +310,12 @@
                $build_result = '';
                if ($this->status == self::S_GOOD)
                {
-                       $build_result = "Build successed." //. " Kaak Test Test"
-                               ; 
+                       $build_result = "Build successed";
+                       if (!empty($this->error_msg))
+                               $build_result .= ":\n" . $this->error_msg;
+                       else
+                               $build_result .= ".";
+                               
                } else {
                        $build_result = "Build failed:\n" . $this->error_msg;
                }

Modified: branches/resources/tests.wesnoth.org/include/TestError.php
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/resources/tests.wesnoth.org/include/TestError.php?rev=28764&r1=28763&r2=28764&view=diff
==============================================================================
--- branches/resources/tests.wesnoth.org/include/TestError.php (original)
+++ branches/resources/tests.wesnoth.org/include/TestError.php Tue Aug 19 
11:47:42 2008
@@ -38,7 +38,7 @@
                        $this->error_type = $name;
                        $this->file = 
FilenameConverter::stripBuildDirs((string)$data->attributes()->file);
                        $this->line = (string)$data->attributes()->line;
-                       $this->error_msg = (string)$data[0];
+                       $this->error_msg = 
str_replace("'","\\'",str_replace("\n","\\n",(string)$data[0]));
                        $result = $this->db->Execute('SELECT t.id as id, 
before_id, last_id FROM test_errors t, builds b
                                        WHERE t.error_type=? 
                                        AND t.file=?

Modified: 
branches/resources/tests.wesnoth.org/smarty_workdir/plugins/modifier.autohide.php
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/resources/tests.wesnoth.org/smarty_workdir/plugins/modifier.autohide.php?rev=28764&r1=28763&r2=28764&view=diff
==============================================================================
--- 
branches/resources/tests.wesnoth.org/smarty_workdir/plugins/modifier.autohide.php
 (original)
+++ 
branches/resources/tests.wesnoth.org/smarty_workdir/plugins/modifier.autohide.php
 Tue Aug 19 11:47:42 2008
@@ -25,7 +25,7 @@
                        /*]]>*/
                        </script>";
        } else {
-               return $text;
+               return str_replace("\\'","'",str_replace('\n',"\n",$text));
        }
 }
 


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to