Fix color escape sequences

This commit is contained in:
Christoph Diehl 2017-06-10 06:09:20 +02:00
parent 56d3cb3851
commit f03f658691

View file

@ -7,9 +7,9 @@ var websocket = null
var logger = (function () { // eslint-disable-line no-unused-vars var logger = (function () { // eslint-disable-line no-unused-vars
const sep = '\n/* ### NEXT TESTCASE ############################## */' const sep = '\n/* ### NEXT TESTCASE ############################## */'
const color = { const color = {
red: '\u0033[1;31m', red: '\033[1;31m',
green: '\u0033[1;32m', green: '\033[1;32m',
clear: '\u0033[0m' clear: '\033[0m'
} }
if (utils.platform.isWindows) { if (utils.platform.isWindows) {
color.red = '' color.red = ''
@ -37,7 +37,7 @@ var logger = (function () { // eslint-disable-line no-unused-vars
} }
function testcase (msg) { function testcase (msg) {
dump('/*L*/ ' + JSON.stringify(msg) + '\n') dump('/*L*/ ' + utils.common.quote(msg) + '\n')
} }
function dumpln (msg) { function dumpln (msg) {
@ -67,7 +67,7 @@ var logger = (function () { // eslint-disable-line no-unused-vars
} catch (e) { } catch (e) {
dump(e.stack || e.stacktrace || '') dump(e.stack || e.stacktrace || '')
} }
error('===') error('================')
} }
return { return {