From fcc04bc4d6ec3d5242f8969f4a841ebac61252e3 Mon Sep 17 00:00:00 2001 From: Tyler Akins Date: Mon, 26 Jan 2015 15:08:23 -0600 Subject: [PATCH] Fixing newlines in shell scripts This helps the partials tests pass --- run-spec.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/run-spec.js b/run-spec.js index bed5cbc..6c334a5 100755 --- a/run-spec.js +++ b/run-spec.js @@ -4,7 +4,10 @@ var async, exec, fs, summary, specFiles; function makeShellString(value) { if (typeof value === 'string') { - return JSON.stringify(value); + // Newlines are tricky + return value.split(/\n/).map(function (chunk) { + return JSON.stringify(chunk); + }).join('"\n"'); } if (typeof value === 'number') {