summaryrefslogtreecommitdiff
path: root/_test/lib
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2007-03-05 23:30:25 +0100
committerAndreas Gohr <andi@splitbrain.org>2007-03-05 23:30:25 +0100
commitd14bceaa1acadf8ed9dca783421662ae36bcef5d (patch)
treef67f3bba9177cae25676bb60cc4f78c5c0b9cfaa /_test/lib
parent1db60ac7f5f2d7a56286651aa8c681005e79fede (diff)
downloadrpg-d14bceaa1acadf8ed9dca783421662ae36bcef5d.tar.gz
rpg-d14bceaa1acadf8ed9dca783421662ae36bcef5d.tar.bz2
added JsStrip unit test files
This patch adds unit test files from the new release of JsStrip [1]. Some of the tests currently fail pointing to bugs which are fixed in the new JsStrip release. The fixes need to be ported to DokuWiki's js_compress function. This patch also adds a way to output additional info when a test fails. It misuses SimpleTest's signalling which is probably a bad idea but works for now. http://code.google.com/p/jsstrip/ darcs-hash:20070305223025-7ad00-583a70a1ddc374eb61193f9315af99baeedea0be.gz
Diffstat (limited to '_test/lib')
-rw-r--r--_test/lib/cli_reporter.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/_test/lib/cli_reporter.php b/_test/lib/cli_reporter.php
index a65112a34..e83911c73 100644
--- a/_test/lib/cli_reporter.php
+++ b/_test/lib/cli_reporter.php
@@ -23,6 +23,7 @@ if (version_compare(phpversion(), '4.3.0', '<') ||
class CLIReporter extends SimpleReporter {
var $faildetail_separator = ST_FAILDETAIL_SEPARATOR;
+ var $_failinfo;
function CLIReporter($faildetail_separator = NULL) {
$this->SimpleReporter();
@@ -54,6 +55,10 @@ class CLIReporter extends SimpleReporter {
parent::paintFail($message);
fwrite(STDERR, 'FAIL' . $this->faildetail_separator .
$this->_paintTestFailDetail($message));
+ if($this->_failinfo){
+ fwrite(STDERR, ' additional info was: '.$this->_failinfo."\n");
+ $this->_failinfo = '';
+ }
}
/**
@@ -66,6 +71,16 @@ class CLIReporter extends SimpleReporter {
}
/**
+ * Handle failinfo message
+ */
+ function paintSignal($type,$message) {
+ parent::paintSignal($type,$message);
+ if($type = 'failinfo') $this->_failinfo = $message;
+ }
+
+
+
+ /**
* Paint a footer with test case name, timestamp, counts of fails and
* exceptions.
*/