@@ -21,8 +21,11 @@ test(testResultCommand, ' foo bar', 'foo', 'bar');
21
21
test ( testResultCommand , ' baz quz' , 'baz' , 'quz' ) ;
22
22
test ( testResultCommand , '' ) ;
23
23
24
- const testEscapedCommand = async ( t , commandArguments , expectedUnix , expectedWindows ) => {
25
- const expected = isWindows ? expectedWindows : expectedUnix ;
24
+ // eslint-disable-next-line max-params
25
+ const testEscapedCommand = async ( t , commandArguments , expectedUnix , expectedWindows , expectedUnixNoIcu = expectedUnix , expectedWindowsNoIcu = expectedWindows ) => {
26
+ const expected = RegExp . isMocked
27
+ ? ( isWindows ? expectedWindowsNoIcu : expectedUnixNoIcu )
28
+ : ( isWindows ? expectedWindows : expectedUnix ) ;
26
29
27
30
t . like (
28
31
await t . throwsAsync ( execa ( 'fail.js' , commandArguments ) ) ,
@@ -89,12 +92,12 @@ test('result.escapedCommand - \\x01', testEscapedCommand, ['\u0001'], '\'\\u0001
89
92
test ( 'result.escapedCommand - \\x7f' , testEscapedCommand , [ '\u007F' ] , '\'\\u007f\'' , '"\\u007f"' ) ;
90
93
test ( 'result.escapedCommand - \\u0085' , testEscapedCommand , [ '\u0085' ] , '\'\\u0085\'' , '"\\u0085"' ) ;
91
94
test ( 'result.escapedCommand - \\u2000' , testEscapedCommand , [ '\u2000' ] , '\'\\u2000\'' , '"\\u2000"' ) ;
92
- test ( 'result.escapedCommand - \\u200E' , testEscapedCommand , [ '\u200E' ] , '\'\\u200e\'' , '"\\u200e"' ) ;
95
+ test ( 'result.escapedCommand - \\u200E' , testEscapedCommand , [ '\u200E' ] , '\'\\u200e\'' , '"\\u200e"' , '\'\u200E\'' , '"\u200E"' ) ;
93
96
test ( 'result.escapedCommand - \\u2028' , testEscapedCommand , [ '\u2028' ] , '\'\\u2028\'' , '"\\u2028"' ) ;
94
97
test ( 'result.escapedCommand - \\u2029' , testEscapedCommand , [ '\u2029' ] , '\'\\u2029\'' , '"\\u2029"' ) ;
95
98
test ( 'result.escapedCommand - \\u5555' , testEscapedCommand , [ '\u5555' ] , '\'\u5555\'' , '"\u5555"' ) ;
96
- test ( 'result.escapedCommand - \\uD800' , testEscapedCommand , [ '\uD800' ] , '\'\\ud800\'' , '"\\ud800"' ) ;
97
- test ( 'result.escapedCommand - \\uE000' , testEscapedCommand , [ '\uE000' ] , '\'\\ue000\'' , '"\\ue000"' ) ;
99
+ test ( 'result.escapedCommand - \\uD800' , testEscapedCommand , [ '\uD800' ] , '\'\\ud800\'' , '"\\ud800"' , '\'\uD800\'' , '"\uD800"' ) ;
100
+ test ( 'result.escapedCommand - \\uE000' , testEscapedCommand , [ '\uE000' ] , '\'\\ue000\'' , '"\\ue000"' , '\'\uE000\'' , '"\uE000"' ) ;
98
101
test ( 'result.escapedCommand - \\U1D172' , testEscapedCommand , [ '\u{1D172}' ] , '\'\u{1D172}\'' , '"\u{1D172}"' ) ;
99
- test ( 'result.escapedCommand - \\U1D173' , testEscapedCommand , [ '\u{1D173}' ] , '\'\\U1d173\'' , '"\\U1d173"' ) ;
100
- test ( 'result.escapedCommand - \\U10FFFD' , testEscapedCommand , [ '\u{10FFFD}' ] , '\'\\U10fffd\'' , '"\\U10fffd"' ) ;
102
+ test ( 'result.escapedCommand - \\U1D173' , testEscapedCommand , [ '\u{1D173}' ] , '\'\\U1d173\'' , '"\\U1d173"' , '\'\u{1D173}\'' , '"\u{1D173}"' ) ;
103
+ test ( 'result.escapedCommand - \\U10FFFD' , testEscapedCommand , [ '\u{10FFFD}' ] , '\'\\U10fffd\'' , '"\\U10fffd"' , '\'\u{10FFFD}\'' , '"\u{10FFFD}"' ) ;
0 commit comments