[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [flashproxy/js] Make flashproxy-test.js quiet by default.



commit ce13b018776a775b85e51d9048dbf99f60bacaf0
Author: David Fifield <david@xxxxxxxxxxxxxxx>
Date:   Thu Mar 29 18:49:10 2012 -0700

    Make flashproxy-test.js quiet by default.
---
 flashproxy-test.js |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/flashproxy-test.js b/flashproxy-test.js
index 0f1ac3f..6250eac 100755
--- a/flashproxy-test.js
+++ b/flashproxy-test.js
@@ -3,6 +3,10 @@
 /* To run this test program, install the Rhino JavaScript interpreter
    (apt-get install rhino). */
 
+var VERBOSE = false;
+if ("-v" in arguments)
+    VERBOSE = true;
+
 var num_tests = 0;
 var num_failed = 0;
 
@@ -32,16 +36,19 @@ function objects_equal(a, b)
 var top = true;
 function announce(test_name)
 {
-    if (!top)
-        print();
+    if (VERBOSE) {
+        if (!top)
+            print();
+        print(test_name);
+    }
     top = false;
-    print(test_name);
 }
 
 function pass(test)
 {
     num_tests++;
-    print("PASS " + repr(test));
+    if (VERBOSE)
+        print("PASS " + repr(test));
 }
 
 function fail(test, expected, actual)

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits