Skip to content

Commit

Permalink
ability to print messages without a nl
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudhead committed Jun 6, 2010
1 parent b851ffe commit 868cd9f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions bin/vows
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ function runSuites(suites, callback) {
(function run(suites, callback) {
var suite = suites.shift();
if (suite) {
msg('runner', "running", suite.subject);
msg('runner', "running", suite.subject + ' ', true);
suite.run(options, function (result) {
Object.keys(result).forEach(function (k) {
results[k] += result[k];
Expand All @@ -273,12 +273,12 @@ function runSuites(suites, callback) {
})(suites, callback);
}

function msg(cmd, subject, str) {
function msg(cmd, subject, str, p) {
if (options.verbose) {
sys.puts( stylize('vows ', 'green')
+ stylize(cmd, 'bold')
+ ' ' + subject + ' '
+ (str ? (str[0] === '/' ? str : inspect(str)) : '')
);
sys[p ? 'print' : 'puts']( stylize('vows ', 'green')
+ stylize(cmd, 'bold')
+ ' ' + subject + ' '
+ (str ? (typeof(str) === 'string' ? str : inspect(str)) : '')
);
}
}

0 comments on commit 868cd9f

Please sign in to comment.