From ed893111b9355615995689e7163870cb88366b28 Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Mon, 15 Apr 2019 20:29:55 +0200 Subject: [PATCH] test: do not strip left whitespace in pseudo-tty tests PR-URL: https://github.com/nodejs/node/pull/27244 Reviewed-By: Luigi Pinca Reviewed-By: Beth Griggs Reviewed-By: Jeremiah Senkpiel --- test/pseudo-tty/console_colors.out | 12 ++++++------ test/pseudo-tty/testcfg.py | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/pseudo-tty/console_colors.out b/test/pseudo-tty/console_colors.out index 6ee69f645bce3e..76f277ecf5bbda 100644 --- a/test/pseudo-tty/console_colors.out +++ b/test/pseudo-tty/console_colors.out @@ -3,9 +3,9 @@ string q { foo: *[32m'bar'*[39m } with object format param Error: test -at abc (../fixtures/node_modules/bar.js:4:4) + at abc (../fixtures/node_modules/bar.js:4:4) foobar -at * (*console_colors.js:*:*) + at * (*console_colors.js:*:*) *[90m at * (internal*:*:*)*[39m *[90m at *[39m *[90m at *[39m @@ -14,22 +14,22 @@ at * (*console_colors.js:*:*) *[90m at *[39m Error: Should not ever get here. -at * (*node_modules*[4m*node_modules*[24m*bar.js:*:*) + at * (*node_modules*[4m*node_modules*[24m*bar.js:*:*) *[90m at *[39m *[90m at *[39m *[90m at *[39m *[90m at *[39m *[90m at *[39m *[90m at *[39m -at * (*console_colors.js:*:*) + at * (*console_colors.js:*:*) *[90m at *[39m *[90m at *[39m Error -at evalmachine.:*:* + at evalmachine.:*:* *[90m at Script.runInThisContext (vm.js:*:*)*[39m *[90m at Object.runInThisContext (vm.js:*:*)*[39m -at * (*console_colors.js:*:*) + at * (*console_colors.js:*:*) *[90m at *[39m *[90m at *[39m *[90m at *[39m diff --git a/test/pseudo-tty/testcfg.py b/test/pseudo-tty/testcfg.py index f2a7242e833dab..96f596d8862b47 100644 --- a/test/pseudo-tty/testcfg.py +++ b/test/pseudo-tty/testcfg.py @@ -66,7 +66,7 @@ def IsFailureOutput(self, output): patterns.append(pattern) # Compare actual output with the expected raw_lines = (output.stdout + output.stderr).split('\n') - outlines = [ s.strip() for s in raw_lines if not self.IgnoreLine(s) ] + outlines = [ s.rstrip() for s in raw_lines if not self.IgnoreLine(s) ] if len(outlines) != len(patterns): print("length differs.") print("expect=%d" % len(patterns))