]> git.pond.sub.org Git - eow/blobdiff - static/dojo-release-1.1.1/util/doh/_rhinoRunner.js
add Dojo 1.1.1
[eow] / static / dojo-release-1.1.1 / util / doh / _rhinoRunner.js
diff --git a/static/dojo-release-1.1.1/util/doh/_rhinoRunner.js b/static/dojo-release-1.1.1/util/doh/_rhinoRunner.js
new file mode 100644 (file)
index 0000000..ae47597
--- /dev/null
@@ -0,0 +1,17 @@
+if(this["dojo"]){
+       dojo.provide("doh._rhinoRunner");
+}
+
+doh.debug = print;
+
+// Override the doh._report method to make it quit with an 
+// appropriate exit code in case of test failures.
+(function(){
+       var oldReport = doh._report;
+       doh._report = function(){
+               oldReport.apply(doh, arguments);
+               if(this._failureCount > 0 || this._errorCount > 0){
+                       quit(1);
+               }
+       }
+})();