Skip to content
Browse files

Tweaks for verbose output.

  • Loading branch information...
1 parent 64e49d8 commit 8a29c9be6bf8777ed6d548c7708fb7b47127136a @tschaub committed Aug 14, 2009
Showing with 8 additions and 2 deletions.
  1. +8 −2 lib/doctest.js
View
10 lib/doctest.js
@@ -117,15 +117,21 @@ exports.main = function(args) {
parser.exit(options);
}
- var targets = file.listTree(options.args[0]).filter(function(p) {
+ var target = options.args[0];
+ var targets = file.listTree(target).filter(function(p) {
return file.isFile(p);
});
var results = {passed: 0, failed: 0, details: []};
+ if (options.verbose) {
+ var title = "doctest " + target;
+ for(var line="", i=0, len=title.length; i<len; line+="=", ++i) {}
+ print(title + "\n" + line);
+ }
targets.forEach(function(target) {
if (options.verbose) {
print("\n" + target);
- for(var line="", i=0, len=target.length; i<len; line+="=", ++i) {}
+ for(var line="", i=0, len=target.length; i<len; line+="-", ++i) {}
print(line + "\n");
}
var r = exports.testfile(target, {verbose: options.verbose});

0 comments on commit 8a29c9b

Please sign in to comment.
Something went wrong with that request. Please try again.