Changeset 919
- Timestamp:
- 05/01/08 11:38:17 (3 months ago)
- Files:
-
- trunk/build/manifests/jelix-lib.mn (modified) (1 diff)
- trunk/build/manifests/jelix-lib.mn (modified) (1 diff)
- trunk/build/manifests/jelix-lib.mn (modified) (1 diff)
- trunk/build/manifests/jelix-lib.mn (modified) (1 diff)
- trunk/build/manifests/jelix-no-opt.mn (modified) (1 diff)
- trunk/build/manifests/jelix-no-opt.mn (modified) (1 diff)
- trunk/build/manifests/jelix-no-opt.mn (modified) (1 diff)
- trunk/build/manifests/jelix-no-opt.mn (modified) (1 diff)
- trunk/lib/jelix-modules/junittests/classes/jtextrespreporter.class.php (modified) (3 diffs)
- trunk/lib/jelix-modules/junittests/classes/jtextrespreporter.class.php (modified) (3 diffs)
- trunk/lib/jelix-modules/junittests/classes/jtextrespreporter.class.php (modified) (3 diffs)
- trunk/lib/jelix-modules/junittests/classes/jtextrespreporter.class.php (modified) (3 diffs)
- trunk/lib/jelix-modules/junittests/controllers/default.cmdline.php (modified) (8 diffs)
- trunk/lib/jelix-modules/junittests/controllers/default.cmdline.php (modified) (8 diffs)
- trunk/lib/jelix-modules/junittests/controllers/default.cmdline.php (modified) (8 diffs)
- trunk/lib/jelix-modules/junittests/controllers/default.cmdline.php (modified) (8 diffs)
- trunk/lib/jelix-scripts/templates/scripts/cmdline.php.tpl (modified) (1 diff)
- trunk/lib/jelix-scripts/templates/scripts/cmdline.php.tpl (modified) (1 diff)
- trunk/lib/jelix-scripts/templates/scripts/cmdline.php.tpl (modified) (1 diff)
- trunk/lib/jelix-scripts/templates/scripts/cmdline.php.tpl (modified) (1 diff)
- trunk/lib/jelix/core-modules/jelix/controllers/help.cmdline.php (modified) (4 diffs)
- trunk/lib/jelix/core-modules/jelix/controllers/help.cmdline.php (modified) (4 diffs)
- trunk/lib/jelix/core-modules/jelix/controllers/help.cmdline.php (modified) (4 diffs)
- trunk/lib/jelix/core-modules/jelix/controllers/help.cmdline.php (modified) (4 diffs)
- trunk/lib/jelix/core/defaultconfig.ini.php (modified) (2 diffs)
- trunk/lib/jelix/core/defaultconfig.ini.php (modified) (2 diffs)
- trunk/lib/jelix/core/defaultconfig.ini.php (modified) (2 diffs)
- trunk/lib/jelix/core/defaultconfig.ini.php (modified) (2 diffs)
- trunk/lib/jelix/core/jCmdlineCoordinator.class.php (added)
- trunk/lib/jelix/core/jCmdlineCoordinator.class.php (added)
- trunk/lib/jelix/core/jCmdlineCoordinator.class.php (added)
- trunk/lib/jelix/core/jCmdlineCoordinator.class.php (added)
- trunk/lib/jelix/core/request/jCmdLineRequest.class.php (modified) (2 diffs)
- trunk/lib/jelix/core/request/jCmdLineRequest.class.php (modified) (2 diffs)
- trunk/lib/jelix/core/request/jCmdLineRequest.class.php (modified) (2 diffs)
- trunk/lib/jelix/core/request/jCmdLineRequest.class.php (modified) (2 diffs)
- trunk/lib/jelix/core/response/jResponseCmdline.class.php (added)
- trunk/lib/jelix/core/response/jResponseCmdline.class.php (added)
- trunk/lib/jelix/core/response/jResponseCmdline.class.php (added)
- trunk/lib/jelix/core/response/jResponseCmdline.class.php (added)
- trunk/lib/jelix/CREDITS (modified) (1 diff)
- trunk/lib/jelix/CREDITS (modified) (1 diff)
- trunk/lib/jelix/CREDITS (modified) (1 diff)
- trunk/lib/jelix/CREDITS (modified) (1 diff)
- trunk/testapp/modules/testapp/controllers/default.cmdline.php (modified) (1 diff)
- trunk/testapp/modules/testapp/controllers/default.cmdline.php (modified) (1 diff)
- trunk/testapp/modules/testapp/controllers/default.cmdline.php (modified) (1 diff)
- trunk/testapp/modules/testapp/controllers/default.cmdline.php (modified) (1 diff)
- trunk/testapp/scripts/cmdline.php (modified) (1 diff)
- trunk/testapp/scripts/cmdline.php (modified) (1 diff)
- trunk/testapp/scripts/cmdline.php (modified) (1 diff)
- trunk/testapp/scripts/cmdline.php (modified) (1 diff)
- trunk/testapp/scripts/tests.php (modified) (1 diff)
- trunk/testapp/scripts/tests.php (modified) (1 diff)
- trunk/testapp/scripts/tests.php (modified) (1 diff)
- trunk/testapp/scripts/tests.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/build/manifests/jelix-lib.mn
r913 r919 58 58 jResponseRedirectUrl.class.php 59 59 jResponseText.class.php 60 jResponseCmdline.class.php 60 61 jResponseXmlrpc.class.php 61 62 jResponseXul.class.php trunk/build/manifests/jelix-lib.mn
r913 r919 58 58 jResponseRedirectUrl.class.php 59 59 jResponseText.class.php 60 jResponseCmdline.class.php 60 61 jResponseXmlrpc.class.php 61 62 jResponseXul.class.php trunk/build/manifests/jelix-lib.mn
r913 r919 58 58 jResponseRedirectUrl.class.php 59 59 jResponseText.class.php 60 jResponseCmdline.class.php 60 61 jResponseXmlrpc.class.php 61 62 jResponseXul.class.php trunk/build/manifests/jelix-lib.mn
r913 r919 58 58 jResponseRedirectUrl.class.php 59 59 jResponseText.class.php 60 jResponseCmdline.class.php 60 61 jResponseXmlrpc.class.php 61 62 jResponseXul.class.php trunk/build/manifests/jelix-no-opt.mn
r673 r919 4 4 * jController.class.php 5 5 * jCoordinator.class.php 6 jCmdlineCoordinator.class.php 6 7 jErrorHandler.lib.php 7 8 jException.lib.php trunk/build/manifests/jelix-no-opt.mn
r673 r919 4 4 * jController.class.php 5 5 * jCoordinator.class.php 6 jCmdlineCoordinator.class.php 6 7 jErrorHandler.lib.php 7 8 jException.lib.php trunk/build/manifests/jelix-no-opt.mn
r673 r919 4 4 * jController.class.php 5 5 * jCoordinator.class.php 6 jCmdlineCoordinator.class.php 6 7 jErrorHandler.lib.php 7 8 jException.lib.php trunk/build/manifests/jelix-no-opt.mn
r673 r919 4 4 * jController.class.php 5 5 * jCoordinator.class.php 6 jCmdlineCoordinator.class.php 6 7 jErrorHandler.lib.php 7 8 jException.lib.php trunk/lib/jelix-modules/junittests/classes/jtextrespreporter.class.php
r781 r919 3 3 * @package jelix 4 4 * @subpackage junittests 5 * @author Jouanneau Laurent 6 * @contributor 7 * @copyright 2005-2008 Jouanneau laurent 5 * @author Jouanneau Laurent 6 * @contributor Thiriot Christophe 7 * @copyright 2005-2008 Jouanneau laurent 8 * @copyright 2008 Thiriot Christophe 8 9 * @link http://www.jelix.org 9 * @licence GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html10 * @licence GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html 10 11 */ 11 12 … … 22 23 23 24 function paintHeader($test_name) { 24 $this->_response-> content.="\n".$test_name."\n--------------------------------\n";25 $this->_response->addContent("\n".$test_name."\n--------------------------------\n"); 25 26 } 26 27 27 28 function paintFooter($test_name) { 28 29 if ($this->getFailCount() + $this->getExceptionCount() == 0) { 29 $this->_response-> content.= "OK\n";30 $this->_response->addContent("OK\n"); 30 31 } else { 31 $this->_response-> content.= "FAILURES!!!\n";32 $this->_response->addContent("FAILURES!!!\n"); 32 33 } 33 $this->_response-> content.="Test cases run: " . $this->getTestCaseProgress() .34 $this->_response->addContent("Test cases run: " . $this->getTestCaseProgress() . 34 35 "/" . $this->getTestCaseCount() . 35 36 ", Passes: " . $this->getPassCount() . 36 37 ", Failures: " . $this->getFailCount() . 37 ", Exceptions: " . $this->getExceptionCount() . "\n" ;38 ", Exceptions: " . $this->getExceptionCount() . "\n"); 38 39 } 39 40 40 41 function paintFail($message) { 41 42 parent::paintFail($message); 42 $this->_response-> content.= $this->getFailCount() . ") $message\n";43 $this->_response->addContent($this->getFailCount() . ") $message\n"); 43 44 $breadcrumb = $this->getTestList(); 44 45 array_shift($breadcrumb); 45 $this->_response-> content.= "\tin " . implode("\n\tin ", array_reverse($breadcrumb));46 $this->_response-> content.= "\n";46 $this->_response->addContent("\tin " . implode("\n\tin ", array_reverse($breadcrumb))); 47 $this->_response->addContent("\n"); 47 48 } 48 49 49 50 function paintException($message) { 50 51 parent::paintException($message); 51 $this->_response-> content.="Exception !!\n";52 $this->_response->addContent("Exception !!\n"); 52 53 53 54 $breadcrumb = $this->getTestList(); 54 55 array_shift($breadcrumb); 55 $this->_response-> content.= "\tin " . implode("\n\tin ", array_reverse($breadcrumb));56 $this->_response-> content.= "\n\t " .$message."\n";56 $this->_response->addContent("\tin " . implode("\n\tin ", array_reverse($breadcrumb))); 57 $this->_response->addContent("\n\t " .$message."\n"); 57 58 } 58 59 59 60 function paintError($message) { 60 61 parent::paintError($message); 61 $this->_response-> content.="Error !!\n";62 $this->_response->addContent("Error !!\n"); 62 63 63 64 $breadcrumb = $this->getTestList(); 64 65 array_shift($breadcrumb); 65 $this->_response-> content.= "\tin " . implode("\n\tin ", array_reverse($breadcrumb));66 $this->_response-> content.= "\n\t " .$message."\n";66 $this->_response->addContent("\tin " . implode("\n\tin ", array_reverse($breadcrumb))); 67 $this->_response->addContent("\n\t " .$message."\n"); 67 68 } 68 69 69 70 function paintMessage($message) { 70 $this->_response-> content.=$message."\n";71 $this->_response->addContent($message."\n"); 71 72 } 72 73 73 74 function paintFormattedMessage($message) { 74 $this->_response-> content.=$message."\n";75 $this->_response->addContent($message."\n"); 75 76 } 76 77 … … 78 79 $diff = new Diff(explode("\n",$stringA),explode("\n",$stringB)); 79 80 if($diff->isEmpty()) { 80 $this->_response-> content.='<p>Erreur diff : bizarre, aucune différence d\'aprés la difflib...</p>';81 $this->_response->addContent('<p>Erreur diff : bizarre, aucune différence d\'aprés la difflib...</p>'); 81 82 }else{ 82 83 $fmt = new UnifiedDiffFormatter(); 83 $this->_response-> content.=$fmt->format($diff);84 $this->_response->addContent($fmt->format($diff)); 84 85 } 85 86 } trunk/lib/jelix-modules/junittests/classes/jtextrespreporter.class.php
r781 r919 3 3 * @package jelix 4 4 * @subpackage junittests 5 * @author Jouanneau Laurent 6 * @contributor 7 * @copyright 2005-2008 Jouanneau laurent 5 * @author Jouanneau Laurent 6 * @contributor Thiriot Christophe 7 * @copyright 2005-2008 Jouanneau laurent 8 * @copyright 2008 Thiriot Christophe 8 9 * @link http://www.jelix.org 9 * @licence GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html10 * @licence GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html 10 11 */ 11 12 … … 22 23 23 24 function paintHeader($test_name) { 24 $this->_response-> content.="\n".$test_name."\n--------------------------------\n";25 $this->_response->addContent("\n".$test_name."\n--------------------------------\n"); 25 26 } 26 27 27 28 function paintFooter($test_name) { 28 29 if ($this->getFailCount() + $this->getExceptionCount() == 0) { 29 $this->_response-> content.= "OK\n";30 $this->_response->addContent("OK\n"); 30 31 } else { 31 $this->_response-> content.= "FAILURES!!!\n";32 $this->_response->addContent("FAILURES!!!\n"); 32 33 } 33 $this->_response-> content.="Test cases run: " . $this->getTestCaseProgress() .34 $this->_response->addContent("Test cases run: " . $this->getTestCaseProgress() . 34 35 "/" . $this->getTestCaseCount() . 35 36 ", Passes: " . $this->getPassCount() . 36 37 ", Failures: " . $this->getFailCount() . 37 ", Exceptions: " . $this->getExceptionCount() . "\n" ;38 ", Exceptions: " . $this->getExceptionCount() . "\n"); 38 39 } 39 40 40 41 function paintFail($message) { 41 42 parent::paintFail($message); 42 $this->_response-> content.= $this->getFailCount() . ") $message\n";43 $this->_response->addContent($this->getFailCount() . ") $message\n"); 43 44 $breadcrumb = $this->getTestList(); 44 45 array_shift($breadcrumb); 45 $this->_response-> content.= "\tin " . implode("\n\tin ", array_reverse($breadcrumb));46 $this->_response-> content.= "\n";46 $this->_response->addContent("\tin " . implode("\n\tin ", array_reverse($breadcrumb))); 47 $this->_response->addContent("\n"); 47 48 } 48 49 49 50 function paintException($message) { 50 51 parent::paintException($message); 51 $this->_response-> content.="Exception !!\n";52 $this->_response->addContent("Exception !!\n"); 52 53 53 54 $breadcrumb = $this->getTestList(); 54 55 array_shift($breadcrumb); 55 $this->_response-> content.= "\tin " . implode("\n\tin ", array_reverse($breadcrumb));56 $this->_response-> content.= "\n\t " .$message."\n";56 $this->_response->addContent("\tin " . implode("\n\tin ", array_reverse($breadcrumb))); 57 $this->_response->addContent("\n\t " .$message."\n"); 57 58 } 58 59 59 60 function paintError($message) { 60 61 parent::paintError($message); 61 $this->_response-> content.="Error !!\n";62 $this->_response->addContent("Error !!\n"); 62 63 63 64 $breadcrumb = $this->getTestList(); 64 65 array_shift($breadcrumb); 65 $this->_response-> content.= "\tin " . implode("\n\tin ", array_reverse($breadcrumb));66 $this->_response-> content.= "\n\t " .$message."\n";66 $this->_response->addContent("\tin " . implode("\n\tin ", array_reverse($breadcrumb))); 67 $this->_response->addContent("\n\t " .$message."\n"); 67 68 } 68 69 69 70 function paintMessage($message) { 70 $this->_response-> content.=$message."\n";71 $this->_response->addContent($message."\n"); 71 72 } 72 73 73 74 function paintFormattedMessage($message) { 74 $this->_response-> content.=$message."\n";75 $this->_response->addContent($message."\n"); 75 76 } 76 77 … … 78 79 $diff = new Diff(explode("\n",$stringA),explode("\n",$stringB)); 79 80 if($diff->isEmpty()) { 80 $this->_response-> content.='<p>Erreur diff : bizarre, aucune différence d\'aprés la difflib...</p>';81 $this->_response->addContent('<p>Erreur diff : bizarre, aucune différence d\'aprés la difflib...</p>'); 81 82 }else{ 82 83 $fmt = new UnifiedDiffFormatter(); 83 $this->_response-> content.=$fmt->format($diff);84 $this->_response->addContent($fmt->format($diff)); 84 85 } 85 86 } trunk/lib/jelix-modules/junittests/classes/jtextrespreporter.class.php
r781 r919 3 3 * @package jelix 4 4 * @subpackage junittests 5 * @author Jouanneau Laurent 6 * @contributor 7 * @copyright 2005-2008 Jouanneau laurent 5 * @author Jouanneau Laurent 6 * @contributor Thiriot Christophe 7 * @copyright 2005-2008 Jouanneau laurent 8 * @copyright 2008 Thiriot Christophe 8 9 * @link http://www.jelix.org 9 * @licence GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html10 * @licence GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html 10 11 */ 11 12 … … 22 23 23 24 function paintHeader($test_name) { 24 $this->_response-> content.="\n".$test_name."\n--------------------------------\n";25 $this->_response->addContent("\n".$test_name."\n--------------------------------\n"); 25 26 } 26 27 27 28 function paintFooter($test_name) { 28 29 if ($this->getFailCount() + $this->getExceptionCount() == 0) { 29 $this->_response-> content.= "OK\n";30 $this->_response->addContent("OK\n"); 30 31 } else { 31 $this->_response-> content.= "FAILURES!!!\n";32 $this->_response->addContent("FAILURES!!!\n"); 32 33 } 33 $this->_response-> content.="Test cases run: " . $this->getTestCaseProgress() .34 $this->_response->addContent("Test cases run: " . $this->getTestCaseProgress() . 34 35 "/" . $this->getTestCaseCount() . 35 36 ", Passes: " . $this->getPassCount() . 36 37 ", Failures: " . $this->getFailCount() . 37 ", Exceptions: " . $this->getExceptionCount() . "\n" ;38 ", Exceptions: " . $this->getExceptionCount() . "\n"); 38 39 } 39 40 40 41 function paintFail($message) { 41 42 parent::paintFail($message); 42 $this->_response-> content.= $this->getFailCount() . ") $message\n";43 $this->_response->addContent($this->getFailCount() . ") $message\n"); 43 44 $breadcrumb = $this->getTestList(); 44 45 array_shift($breadcrumb); 45 $this->_response-> content.= "\tin " . implode("\n\tin ", array_reverse($breadcrumb));46 $this->_response-> content.= "\n";46 $this->_response->addContent("\tin " . implode("\n\tin ", array_reverse($breadcrumb))); 47 $this->_response->addContent("\n"); 47 48 } 48 49 49 50 function paintException($message) { 50 51 parent::paintException($message); 51 $this->_response-> content.="Exception !!\n";52 $this->_response->addContent("Exception !!\n"); 52 53 53 54 $breadcrumb = $this->getTestList(); 54 55 array_shift($breadcrumb); 55 $this->_response-> content.= "\tin " . implode("\n\tin ", array_reverse($breadcrumb));56 $this->_response-> content.= "\n\t " .$message."\n";56 $this->_response->addContent("\tin " . implode("\n\tin ", array_reverse($breadcrumb))); 57 $this->_response->addContent("\n\t " .$message."\n"); 57 58 } 58 59 59 60 function paintError($message) { 60 61 parent::paintError($message); 61 $this->_response-> content.="Error !!\n";62 $this->_response->addContent("Error !!\n"); 62 63 63 64 $breadcrumb = $this->getTestList(); 64 65 array_shift($breadcrumb); 65 $this->_response-> content.= "\tin " . implode("\n\tin ", array_reverse($breadcrumb));66 $this->_response-> content.= "\n\t " .$message."\n";66 $this->_response->addContent("\tin " . implode("\n\tin ", array_reverse($breadcrumb))); 67 $this->_response->addContent("\n\t " .$message."\n"); 67 68 } 68 69 69 70 function paintMessage($message) { 70 $this->_response-> content.=$message."\n";71 $this->_response->addContent($message."\n"); 71 72 } 72 73 73 74 function paintFormattedMessage($message) { 74 $this->_response-> content.=$message."\n";75 $this->_response->addContent($message."\n"); 75 76 } 76 77 … … 78 79 $diff = new Diff(explode("\n",$stringA),explode("\n",$stringB)); 79 80 if($diff->isEmpty()) { 80 $this->_response-> content.='<p>Erreur diff : bizarre, aucune différence d\'aprés la difflib...</p>';81 $this->_response->addContent('<p>Erreur diff : bizarre, aucune différence d\'aprés la difflib...</p>'); 81 82 }else{ 82 83 $fmt = new UnifiedDiffFormatter(); 83 $this->_response-> content.=$fmt->format($diff);84 $this->_response->addContent($fmt->format($diff)); 84 85 } 85 86 } trunk/lib/jelix-modules/junittests/classes/jtextrespreporter.class.php
r781 r919 3 3 * @package jelix 4 4 * @subpackage junittests 5 * @author Jouanneau Laurent 6 * @contributor 7 * @copyright 2005-2008 Jouanneau laurent 5 * @author Jouanneau Laurent 6 * @contributor Thiriot Christophe 7 * @copyright 2005-2008 Jouanneau laurent 8 * @copyright 2008 Thiriot Christophe 8 9 * @link http://www.jelix.org 9 * @licence GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html10 * @licence GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html 10 11 */ 11 12 … … 22 23 23 24 function paintHeader($test_name) { 24 $this->_response-> content.="\n".$test_name."\n--------------------------------\n";25 $this->_response->addContent("\n".$test_name."\n--------------------------------\n"); 25 26 } 26 27 27 28 function paintFooter($test_name) { 28 29 if ($this->getFailCount() + $this->getExceptionCount() == 0) { 29 $this->_response-> content.= "OK\n";30 $this->_response->addContent("OK\n"); 30 31 } else { 31 $this->_response-> content.= "FAILURES!!!\n";32 $this->_response->addContent("FAILURES!!!\n"); 32 33 } 33 $this->_response-> content.="Test cases run: " . $this->getTestCaseProgress() .34 $this->_response->addContent("Test cases run: " . $this->getTestCaseProgress() . 34 35 "/" . $this->getTestCaseCount() . 35 36 ", Passes: " . $this->getPassCount() . 36 37 ", Failures: " . $this->getFailCount() . 37 ", Exceptions: " . $this->getExceptionCount() . "\n" ;38 ", Exceptions: " . $this->getExceptionCount() . "\n"); 38 39 } 39 40 40 41 function paintFail($message) { 41 42 parent::paintFail($message); 42 $this->_response-> content.= $this->getFailCount() . ") $message\n";43 $this->_response->addContent($this->getFailCount() . ") $message\n"); 43 44 $breadcrumb = $this->getTestList(); 44 45 array_shift($breadcrumb); 45 $this->_response-> content.= "\tin " . implode("\n\tin ", array_reverse($breadcrumb));46 $this->_response-> content.= "\n";46 $this->_response->addContent("\tin " . implode("\n\tin ", array_reverse($breadcrumb))); 47 $this->_response->addContent("\n"); 47 48 } 48 49 49 50 function paintException($message) { 50 51 parent::paintException($message); 51 $this->_response-> content.="Exception !!\n";52 $this->_response->addContent("Exception !!\n"); 52 53 53 54 $breadcrumb = $this->getTestList(); 54 55 array_shift($breadcrumb); 55 $this->_response-> content.= "\tin " . implode("\n\tin ", array_reverse($breadcrumb));56 $this->_response-> content.= "\n\t " .$message."\n";56 $this->_response->addContent("\tin " . implode("\n\tin ", array_reverse($breadcrumb))); 57 $this->_response->addContent("\n\t " .$message."\n"); 57 58 } 58 59 59 60 function paintError($message) { 60 61 parent::paintError($message); 61 $this->_response-> content.="Error !!\n";62 $this->_response->addContent("Error !!\n"); 62 63 63 64 $breadcrumb = $this->getTestList(); 64 65 array_shift($breadcrumb); 65 $this->_response-> content.= "\tin " . implode("\n\tin ", array_reverse($breadcrumb));66 $this->_response-> content.= "\n\t " .$message."\n";66 $this->_response->addContent("\tin " . implode("\n\tin ", array_reverse($breadcrumb))); 67 $this->_response->addContent("\n\t " .$message."\n"); 67 68 } 68 69 69 70 function paintMessage($message) { 70 $this->_response-> content.=$message."\n";71 $this->_response->addContent($message."\n"); 71 72 } 72 73 73 74 function paintFormattedMessage($message) { 74 $this->_response-> content.=$message."\n";75 $this->_response->addContent($message."\n"); 75 76 } 76 77 … … 78 79 $diff = new Diff(explode("\n",$stringA),explode("\n",$stringB)); 79 80 if($diff->isEmpty()) { 80 $this->_response-> content.='<p>Erreur diff : bizarre, aucune différence d\'aprés la difflib...</p>';81 $this->_response->addContent('<p>Erreur diff : bizarre, aucune différence d\'aprés la difflib...</p>'); 81 82 }else{ 82 83 $fmt = new UnifiedDiffFormatter(); 83 $this->_response-> content.=$fmt->format($diff);84 $this->_response->addContent($fmt->format($diff)); 84 85 } 85 86 } trunk/lib/jelix-modules/junittests/controllers/default.cmdline.php
r852 r919 4 4 * @subpackage junittests 5 5 * @author Jouanneau Laurent 6 * @contributor 6 * @contributor Thiriot Christophe 7 7 * @copyright 2008 Jouanneau laurent 8 * @copyright 2008 Thiriot Christophe 8 9 * @link http://www.jelix.org 9 10 * @licence GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html … … 38 39 $rep = $this->getResponse(); 39 40 40 $rep-> content ='41 $rep->addContent(' 41 42 Unit Tests php version: '.phpversion().' Jelix version: '.JELIX_VERSION.' 42 43 =========================================================================== 43 ' ;44 '); 44 45 45 46 foreach($GLOBALS['gJConfig']->_modulesPathList as $module=>$path){ … … 64 65 65 66 protected function _finishResponse($rep){ 66 67 67 return $rep; 68 68 } … … 75 75 if(count($this->testsList)){ 76 76 foreach($this->testsList as $module=>$tests) { 77 $rep-> content.= 'module "'.$module."\":\n";77 $rep->addContent('module "'.$module."\":\n", true); 78 78 foreach($tests as $test){ 79 $rep-> content.= "\t".$test[2]."\t(".$test[1].")\n";79 $rep->addContent("\t".$test[2]."\t(".$test[1].")\n", true); 80 80 } 81 81 } 82 82 } 83 83 else { 84 $rep-> content.='No availabled tests';84 $rep->addContent('No availabled tests'); 85 85 } 86 86 return $this->_finishResponse($rep); … … 102 102 $group->addTestFile($GLOBALS['gJConfig']->_modulesPathList[$module].'tests/'.$test[0]); 103 103 } 104 $group->run($reporter); 104 $result = $group->run($reporter); 105 if (!$result) $rep->setExitCode(jResponseCmdline::EXIT_CODE_ERROR); 105 106 jContext::pop(); 106 107 } … … 125 126 } 126 127 jContext::push($module); 127 $group->run($reporter); 128 $result = $group->run($reporter); 129 if (!$result) $rep->setExitStatus(jResponseCmdline::EXIT_CODE_ERROR); 128 130 jContext::pop(); 129 131 } … … 149 151 $group->addTestFile($GLOBALS['gJConfig']->_modulesPathList[$module].'tests/'.$test[0]); 150 152 jContext::push($module); 151 $group->run($reporter); 153 $result = $group->run($reporter); 154 if (!$result) $rep->setExitStatus(jResponseCmdline::EXIT_CODE_ERROR); 152 155 jContext::pop(); 153 156 break; … … 155 158 } 156 159 }else 157 $rep-> content.= "\n" . 'no tests for "'.$module.'" module.' . "\n";160 $rep->addContent("\n" . 'no tests for "'.$module.'" module.' . "\n"); 158 161 return $this->_finishResponse($rep); 159 162 } trunk/lib/jelix-modules/junittests/controllers/default.cmdline.php
r852 r919 4 4 * @subpackage junittests 5 5 * @author Jouanneau Laurent 6 * @contributor 6 * @contributor Thiriot Christophe 7 7 * @copyright 2008 Jouanneau laurent 8 * @copyright 2008 Thiriot Christophe 8 9 * @link http://www.jelix.org 9 10 * @licence GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html … … 38 39 $rep = $this->getResponse(); 39 40 40 $rep-> content ='41 $rep->addContent(' 41 42 Unit Tests php version: '.phpversion().' Jelix version: '.JELIX_VERSION.' 42 43 =========================================================================== 43 ' ;44 '); 44 45 45 46 foreach($GLOBALS['gJConfig']->_modulesPathList as $module=>$path){ … … 64 65 65 66 protected function _finishResponse($rep){ 66 67 67 return $rep; 68 68 } … … 75 75 if(count($this->testsList)){ 76 76 foreach($this->testsList as $module=>$tests) { 77 $rep-> content.= 'module "'.$module."\":\n";77 $rep->addContent('module "'.$module."\":\n", true); 78 78 foreach($tests as $test){ 79 $rep-> content.= "\t".$test[2]."\t(".$test[1].")\n";79 $rep->addContent("\t".$test[2]."\t(".$test[1].")\n", true); 80 80 } 81 81 } 82 82 } 83 83 else { 84 $rep-> content.='No availabled tests';84 $rep->addContent('No availabled tests'); 85 85 } 86 86 return $this->_finishResponse($rep); … … 102 102 $group->addTestFile($GLOBALS['gJConfig']->_modulesPathList[$module].'tests/'.$test[0]); 103 103 } 104 $group->run($reporter); 104 $result = $group->run($reporter); 105 if (!$result) $rep->setExitCode(jResponseCmdline::EXIT_CODE_ERROR); 105 106 jContext::pop(); 106 107 } … … 125 126 } 126 127 jContext::push($module); 127 $group->run($reporter); 128 $result = $group->run($reporter); 129 if (!$result) $rep->setExitStatus(jResponseCmdline::EXIT_CODE_ERROR); 128 130 jContext::pop(); 129 131 } … … 149 151 $group->addTestFile($GLOBALS['gJConfig']->_modulesPathList[$module].'tests/'.$test[0]); 150 152 jContext::push($module); 151 $group->run($reporter); 153 $result = $group->run($reporter); 154 if (!$result) $rep->setExitStatus(jResponseCmdline::EXIT_CODE_ERROR); 152 155 jContext::pop(); 153 156 break; … … 155 158 } 156 159 }else 157 $rep-> content.= "\n" . 'no tests for "'.$module.'" module.' . "\n";160 $rep->addContent("\n" . 'no tests for "'.$module.'" module.' . "\n"); 158 161 return $this->_finishResponse($rep); 159 162 } trunk/lib/jelix-modules/junittests/controllers/default.cmdline.php
r852 r919 4 4 * @subpackage junittests 5 5 * @author Jouanneau Laurent 6 * @contributor 6 * @contributor Thiriot Christophe 7 7 * @copyright 2008 Jouanneau laurent 8 * @copyright 2008 Thiriot Christophe 8 9 * @link http://www.jelix.org 9 10 * @licence GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html … … 38 39 $rep = $this->getResponse(); 39 40 40 $rep-> content ='41 $rep->addContent(' 41 42 Unit Tests php version: '.phpversion().' Jelix version: '.JELIX_VERSION.' 42 43 =========================================================================== 43 ' ;44 '); 44 45 45 46 foreach($GLOBALS['gJConfig']->_modulesPathList as $module=>$path){ … … 64 65 65 66 protected function _finishResponse($rep){ 66 67 67 return $rep; 68 68 } … … 75 75 if(count($this->testsList)){ 76 76 foreach($this->testsList as $module=>$tests) { 77 $rep-> content.= 'module "'.$module."\":\n";77 $rep->addContent('module "'.$module."\":\n", true); 78 78 foreach($tests as $test){ 79 $rep-> content.= "\t".$test[2]."\t(".$test[1].")\n";79 $rep->addContent("\t".$test[2]."\t(".$test[1].")\n", true); 80 80 } 81 81 } 82 82 } 83 83 else { 84 $rep-> content.='No availabled tests';84 $rep->addContent('No availabled tests'); 85 85 } 86 86 return $this->_finishResponse($rep); … … 102 102 $group->addTestFile($GLOBALS['gJConfig']->_modulesPathList[$module].'tests/'.$test[0]); 103 103 } 104 $group->run($reporter); 104 $result = $group->run($reporter); 105 if (!$result) $rep->setExitCode(jResponseCmdline::EXIT_CODE_ERROR); 105 106 jContext::pop(); 106 107 } … … 125 126 } 126 127 jContext::push($module); 127 $group->run($reporter); 128 $result = $group->run($reporter); 129 if (!$result) $rep->setExitStatus(jResponseCmdline::EXIT_CODE_ERROR); 128 130 jContext::pop(); 129 131 } … … 149 151 $group->addTestFile($GLOBALS['gJConfig']->_modulesPathList[$module].'tests/'.$test[0]); 150 152 jContext::push($module); 151 $group->run($reporter); 153 $result = $group->run($reporter); 154 if (!$result) $rep->setExitStatus(jResponseCmdline::EXIT_CODE_ERROR); 152 155 jContext::pop(); 153 156 break; … … 155 158 } 156 159 }else 157 $rep-> content.= "\n" . 'no tests for "'.$module.'" module.' . "\n";160 $rep->addContent("\n" . 'no tests for "'.$module.'" module.' . "\n"); 158 161 return $this->_finishResponse($rep); 159 162 } trunk/lib/jelix-modules/junittests/controllers/default.cmdline.php
r852 r919 4 4 * @subpackage junittests 5 5 * @author Jouanneau Laurent 6 * @contributor 6 * @contributor Thiriot Christophe 7 7 * @copyright 2008 Jouanneau laurent 8 * @copyright 2008 Thiriot Christophe 8 9 * @link http://www.jelix.org 9
