@@ -29,53 +29,54 @@ describe('InputHandler', () => {
29
29
it ( 'should call Terminal.setOption with correct params' , ( ) => {
30
30
let terminal = new MockInputHandlingTerminal ( ) ;
31
31
let inputHandler = new InputHandler ( terminal ) ;
32
+ const collect = ' ' ;
32
33
33
- inputHandler . setCursorStyle ( [ 0 ] ) ;
34
+ inputHandler . setCursorStyle ( [ 0 ] , collect ) ;
34
35
assert . equal ( terminal . options [ 'cursorStyle' ] , 'block' ) ;
35
36
assert . equal ( terminal . options [ 'cursorBlink' ] , true ) ;
36
37
37
38
terminal . options = { } ;
38
- inputHandler . setCursorStyle ( [ 1 ] ) ;
39
+ inputHandler . setCursorStyle ( [ 1 ] , collect ) ;
39
40
assert . equal ( terminal . options [ 'cursorStyle' ] , 'block' ) ;
40
41
assert . equal ( terminal . options [ 'cursorBlink' ] , true ) ;
41
42
42
43
terminal . options = { } ;
43
- inputHandler . setCursorStyle ( [ 2 ] ) ;
44
+ inputHandler . setCursorStyle ( [ 2 ] , collect ) ;
44
45
assert . equal ( terminal . options [ 'cursorStyle' ] , 'block' ) ;
45
46
assert . equal ( terminal . options [ 'cursorBlink' ] , false ) ;
46
47
47
48
terminal . options = { } ;
48
- inputHandler . setCursorStyle ( [ 3 ] ) ;
49
+ inputHandler . setCursorStyle ( [ 3 ] , collect ) ;
49
50
assert . equal ( terminal . options [ 'cursorStyle' ] , 'underline' ) ;
50
51
assert . equal ( terminal . options [ 'cursorBlink' ] , true ) ;
51
52
52
53
terminal . options = { } ;
53
- inputHandler . setCursorStyle ( [ 4 ] ) ;
54
+ inputHandler . setCursorStyle ( [ 4 ] , collect ) ;
54
55
assert . equal ( terminal . options [ 'cursorStyle' ] , 'underline' ) ;
55
56
assert . equal ( terminal . options [ 'cursorBlink' ] , false ) ;
56
57
57
58
terminal . options = { } ;
58
- inputHandler . setCursorStyle ( [ 5 ] ) ;
59
+ inputHandler . setCursorStyle ( [ 5 ] , collect ) ;
59
60
assert . equal ( terminal . options [ 'cursorStyle' ] , 'bar' ) ;
60
61
assert . equal ( terminal . options [ 'cursorBlink' ] , true ) ;
61
62
62
63
terminal . options = { } ;
63
- inputHandler . setCursorStyle ( [ 6 ] ) ;
64
+ inputHandler . setCursorStyle ( [ 6 ] , collect ) ;
64
65
assert . equal ( terminal . options [ 'cursorStyle' ] , 'bar' ) ;
65
66
assert . equal ( terminal . options [ 'cursorBlink' ] , false ) ;
66
67
} ) ;
67
68
} ) ;
68
69
describe ( 'setMode' , ( ) => {
69
70
it ( 'should toggle Terminal.bracketedPasteMode' , ( ) => {
70
71
let terminal = new MockInputHandlingTerminal ( ) ;
71
- terminal . prefix = '?' ;
72
+ const collect = '?' ;
72
73
terminal . bracketedPasteMode = false ;
73
74
let inputHandler = new InputHandler ( terminal ) ;
74
75
// Set bracketed paste mode
75
- inputHandler . setMode ( [ 2004 ] ) ;
76
+ inputHandler . setMode ( [ 2004 ] , collect ) ;
76
77
assert . equal ( terminal . bracketedPasteMode , true ) ;
77
78
// Reset bracketed paste mode
78
- inputHandler . resetMode ( [ 2004 ] ) ;
79
+ inputHandler . resetMode ( [ 2004 ] , collect ) ;
79
80
assert . equal ( terminal . bracketedPasteMode , false ) ;
80
81
} ) ;
81
82
} ) ;
0 commit comments