mirror of
https://github.com/tests-always-included/mo.git
synced 2024-12-18 16:27:52 +00:00
Fixing newlines in shell scripts
This helps the partials tests pass
This commit is contained in:
parent
e41ec5bbb3
commit
fcc04bc4d6
@ -4,7 +4,10 @@ var async, exec, fs, summary, specFiles;
|
|||||||
|
|
||||||
function makeShellString(value) {
|
function makeShellString(value) {
|
||||||
if (typeof value === 'string') {
|
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') {
|
if (typeof value === 'number') {
|
||||||
|
Loading…
Reference in New Issue
Block a user