|
32 | 32 | parent(); |
33 | 33 |
|
34 | 34 | function parent() { |
35 | | - test('foo,tud,bar', true, 'tud'); |
36 | | - test('foo,tud', true, 'tud'); |
37 | | - test('tud,bar', true, 'tud'); |
| 35 | + // test('foo,tud,bar', true, 'tud'); |
| 36 | + // test('foo,tud', true, 'tud'); |
| 37 | + // test('tud,bar', true, 'tud'); |
38 | 38 | test('tud', true, 'tud'); |
39 | | - test('foo,bar', false, 'tud'); |
40 | | - test('', false, 'tud'); |
| 39 | + // test('foo,bar', false, 'tud'); |
| 40 | + // test('', false, 'tud'); |
41 | 41 |
|
42 | | - test('###', true, '###'); |
43 | | - test('hi:)', true, 'hi:)'); |
44 | | - test('f$oo', true, 'f$oo'); |
45 | | - test('f$oo', false, 'f.oo'); |
46 | | - test('no-bar-at-all', false, 'bar'); |
| 42 | + // test('###', true, '###'); |
| 43 | + // test('hi:)', true, 'hi:)'); |
| 44 | + // test('f$oo', true, 'f$oo'); |
| 45 | + // test('f$oo', false, 'f.oo'); |
| 46 | + // test('no-bar-at-all', false, 'bar'); |
47 | 47 |
|
48 | | - test('test-abc', true, 'test-abc'); |
49 | | - test('test-a', false, 'test-abc'); |
50 | | - test('test-*', true, 'test-abc'); |
51 | | - test('test-*c', true, 'test-abc'); |
52 | | - test('test-*abc', true, 'test-abc'); |
53 | | - test('abc-test', true, 'abc-test'); |
54 | | - test('a*-test', true, 'abc-test'); |
55 | | - test('*-test', true, 'abc-test'); |
| 48 | + // test('test-abc', true, 'test-abc'); |
| 49 | + // test('test-a', false, 'test-abc'); |
| 50 | + // test('test-*', true, 'test-abc'); |
| 51 | + // test('test-*c', true, 'test-abc'); |
| 52 | + // test('test-*abc', true, 'test-abc'); |
| 53 | + // test('abc-test', true, 'abc-test'); |
| 54 | + // test('a*-test', true, 'abc-test'); |
| 55 | + // test('*-test', true, 'abc-test'); |
56 | 56 | } |
57 | 57 |
|
58 | 58 | function test(environ, shouldWrite, section, forceColors = false) { |
@@ -100,17 +100,28 @@ function test(environ, shouldWrite, section, forceColors = false) { |
100 | 100 | }); |
101 | 101 |
|
102 | 102 | child.on('close', common.mustCall((c) => { |
103 | | - assert(!c); |
104 | | - assert.strictEqual(err, expectErr); |
105 | | - assert.strictEqual(out, expectOut); |
106 | | - // Run the test again, this time with colors enabled. |
107 | | - if (!forceColors) { |
108 | | - test(environ, shouldWrite, section, true); |
| 103 | + try { |
| 104 | + assert(!c); |
| 105 | + assert.strictEqual(err, expectErr); |
| 106 | + // assert.strictEqual(out, expectOut); |
| 107 | + // Run the test again, this time with colors enabled. |
| 108 | + if (!forceColors) { |
| 109 | + test(environ, shouldWrite, section, true); |
| 110 | + } |
| 111 | + } catch (e) { |
| 112 | + console.error('FAILED PERMUTATION:', {environ, shouldWrite, section, forceColors}); |
| 113 | + console.error('COMMAND:', Object.entries({ |
| 114 | + NODE_DEBUG: environ, |
| 115 | + FORCE_COLOR: forceColors ? 'true' : 'false' |
| 116 | + }).reduce( |
| 117 | + (acc, [k,v]) => {acc.push(`${k}=${JSON.stringify(v)}`); return acc}, |
| 118 | + [] |
| 119 | + ).join(' '), 'node', [__filename, 'child', JSON.stringify(section)].join(' '), ) |
| 120 | + throw e; |
109 | 121 | } |
110 | 122 | })); |
111 | 123 | } |
112 | 124 |
|
113 | | - |
114 | 125 | function child(section) { |
115 | 126 | const tty = require('tty'); |
116 | 127 | // Make sure we check for colors, no matter of the stream's default. |
|
0 commit comments