From 8235ffd7863305485dbbe27e7ed8bbe9f369d19d Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Wed, 18 Sep 2019 16:21:47 -0500 Subject: console: skip/strip %c formatting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: https://github.com/nodejs/node/issues/29605 Refs: https://console.spec.whatwg.org PR-URL: https://github.com/nodejs/node/pull/29606 Reviewed-By: Colin Ihrig Reviewed-By: Anna Henningsen Reviewed-By: Michaƫl Zasso Reviewed-By: Ruben Bridgewater Reviewed-By: Yongsheng Zhang Reviewed-By: David Carlier Reviewed-By: Luigi Pinca --- test/parallel/test-util-format.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/parallel/test-util-format.js') diff --git a/test/parallel/test-util-format.js b/test/parallel/test-util-format.js index a83a6f3c20..810e9ac114 100644 --- a/test/parallel/test-util-format.js +++ b/test/parallel/test-util-format.js @@ -317,6 +317,12 @@ assert.strictEqual(util.format('abc%', 1), 'abc% 1'); assert.strictEqual(util.format('%i', 1, 'number'), '1 number'); assert.strictEqual(util.format('%i', 1, () => {}), '1 [Function (anonymous)]'); +// %c from https://console.spec.whatwg.org/ +assert.strictEqual(util.format('%c'), '%c'); +assert.strictEqual(util.format('%cab'), '%cab'); +assert.strictEqual(util.format('%cab', 'color: blue'), 'ab'); +assert.strictEqual(util.format('%cab', 'color: blue', 'c'), 'ab c'); + { const o = {}; o.o = o; -- cgit v1.2.3