ide на основе vs code · VibeGit
ide на основе vs code Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
krutaya-ide-na-osnove-vs-code / src / vs / workbench / contrib / debug / test / node / terminals.test.ts 151 строк · изменён 14 нояб., 04:52
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
import assert from 'assert' ;
import { ensureNoDisposablesAreLeakedInTestSuite } from '../../../../../base/test/common/utils.js' ;
import { prepareCommand } from '../../node/terminals.js' ;
suite ( 'Debug - prepareCommand' , ( ) => {
ensureNoDisposablesAreLeakedInTestSuite ( ) ;
test ( 'bash' , ( ) => {
assert. strictEqual (
prepareCommand ( 'bash' , [ '{$} (' ] , false
assert
assert
assert
assert
assert
assert
assert
assert
assert
assert
assert
assert
assert
assert
assert
assert
assert
assert
assert
assert
assert
assert
assert
assert
assert
assert
assert
assert
leftSingleQuotationMark
rightSingleQuotationMark
assert
)
.
trim
(
)
,
'\\{\\$\\}\\ \\('
)
;
.
strictEqual
(
prepareCommand
(
'bash'
,
[
'hello'
,
'world'
,
'--flag=true'
]
,
false
)
.
trim
(
)
,
'hello world --flag=true'
)
;
.
strictEqual
(
prepareCommand
(
'bash'
,
[
' space arg '
]
,
false
)
.
trim
(
)
,
'\\ space\\ arg\\'
)
;
.
strictEqual
(
prepareCommand
(
'bash'
,
[
'{$} ('
]
,
true
)
.
trim
(
)
,
'{$} ('
)
;
.
strictEqual
(
prepareCommand
(
'bash'
,
[
'hello'
,
'world'
,
'--flag=true'
]
,
true
)
.
trim
(
)
,
'hello world --flag=true'
)
;
.
strictEqual
(
prepareCommand
(
'bash'
,
[
' space arg '
]
,
true
)
.
trim
(
)
,
'space arg'
)
;
}
)
;
test
(
'bash - do not escape > and <'
,
(
)
=>
{
.
strictEqual
(
prepareCommand
(
'bash'
,
[
'arg1'
,
'>'
,
'> hello.txt'
,
'<'
,
'<input.in'
]
,
false
)
.
trim
(
)
,
'arg1 > \\>\\ hello.txt < \\<input.in'
)
;
}
)
;
test
(
'cmd'
,
(
)
=>
{
.
strictEqual
(
prepareCommand
(
'cmd.exe'
,
[
'^!< '
]
,
false
)
.
trim
(
)
,
'"^^^!^< "'
)
;
.
strictEqual
(
prepareCommand
(
'cmd.exe'
,
[
'hello'
,
'world'
,
'--flag=true'
]
,
false
)
.
trim
(
)
,
'hello world --flag=true'
)
;
.
strictEqual
(
prepareCommand
(
'cmd.exe'
,
[
' space arg '
]
,
false
)
.
trim
(
)
,
'" space arg "'
)
;
.
strictEqual
(
prepareCommand
(
'cmd.exe'
,
[
'"A>0"'
]
,
false
)
.
trim
(
)
,
'"""A^>0"""'
)
;
.
strictEqual
(
prepareCommand
(
'cmd.exe'
,
[
''
]
,
false
)
.
trim
(
)
,
'""'
)
;
.
strictEqual
(
prepareCommand
(
'cmd.exe'
,
[
'^!< '
]
,
true
)
.
trim
(
)
,
'^!<'
)
;
.
strictEqual
(
prepareCommand
(
'cmd.exe'
,
[
'hello'
,
'world'
,
'--flag=true'
]
,
true
)
.
trim
(
)
,
'hello world --flag=true'
)
;
.
strictEqual
(
prepareCommand
(
'cmd.exe'
,
[
' space arg '
]
,
true
)
.
trim
(
)
,
'space arg'
)
;
.
strictEqual
(
prepareCommand
(
'cmd.exe'
,
[
'"A>0"'
]
,
true
)
.
trim
(
)
,
'"A>0"'
)
;
.
strictEqual
(
prepareCommand
(
'cmd.exe'
,
[
''
]
,
true
)
.
trim
(
)
,
''
)
;
}
)
;
test
(
'cmd - do not escape > and <'
,
(
)
=>
{
.
strictEqual
(
prepareCommand
(
'cmd.exe'
,
[
'arg1'
,
'>'
,
'> hello.txt'
,
'<'
,
'<input.in'
]
,
false
)
.
trim
(
)
,
'arg1 > "^> hello.txt" < ^<input.in'
)
;
}
)
;
test
(
'powershell'
,
(
)
=>
{
.
strictEqual
(
prepareCommand
(
'powershell'
,
[
'!< '
]
,
false
)
.
trim
(
)
,
` & '!< ' `
)
;
.
strictEqual
(
prepareCommand
(
'powershell'
,
[
'hello'
,
'world'
,
'--flag=true'
]
,
false
)
.
trim
(
)
,
` & 'hello' 'world' '--flag=true' `
)
;
.
strictEqual
(
prepareCommand
(
'powershell'
,
[
' space arg '
]
,
false
)
.
trim
(
)
,
` & ' space arg ' `
)
;
.
strictEqual
(
prepareCommand
(
'powershell'
,
[
'"A>0"'
]
,
false
)
.
trim
(
)
,
` & '"A>0"' `
)
;
.
strictEqual
(
prepareCommand
(
'powershell'
,
[
''
]
,
false
)
.
trim
(
)
,
` & '' `
)
;
.
strictEqual
(
prepareCommand
(
'powershell'
,
[
'!< '
]
,
true
)
.
trim
(
)
,
'!<'
)
;
.
strictEqual
(
prepareCommand
(
'powershell'
,
[
'hello'
,
'world'
,
'--flag=true'
]
,
true
)
.
trim
(
)
,
'hello world --flag=true'
)
;
.
strictEqual
(
prepareCommand
(
'powershell'
,
[
' space arg '
]
,
true
)
.
trim
(
)
,
'space arg'
)
;
.
strictEqual
(
prepareCommand
(
'powershell'
,
[
'"A>0"'
]
,
true
)
.
trim
(
)
,
'"A>0"'
)
;
.
strictEqual
(
prepareCommand
(
'powershell'
,
[
''
]
,
true
)
.
trim
(
)
,
` `
)
;
}
)
;
test
(
'powershell - do not escape > and <'
,
(
)
=>
{
.
strictEqual
(
prepareCommand
(
'powershell'
,
[
'arg1'
,
'>'
,
'> hello.txt'
,
'<'
,
'<input.in'
]
,
false
)
.
trim
(
)
,
` & 'arg1' > '> hello.txt' < '<input.in' `
)
;
}
)
;
test
(
'powershell - quotes environment values'
,
(
)
=>
{
const
=
'\u2018'
;
const
=
'\u2019'
;
.
deepStrictEqual
(
[
prepareCommand
(
'powershell'
,
[
]
,
false
,
undefined
,
{
SIMPLE
:
'hello'
}
)
.
trim
(
)
,
prepareCommand
(
'powershell'
,
[
]
,
false
,
undefined
,
{
SPACES
:
'hello world'
}
)
.
trim
(
)
,
prepareCommand
(
'powershell'
,
[
]
,
false
,
undefined
,
{
EMPTY
:
''
}
)
.
trim
(
)
,
prepareCommand
(
'powershell'
,
[
]
,
false
,
undefined
,
{
QUOTE
:
'hello\'world'
}
)
.
trim
(
)
,
prepareCommand
(
'powershell'
,
[
]
,
false
,
undefined
,
{
MULTI
:
'it\'s \'ok\''
}
)
.
trim
(
)
,
prepareCommand
(
'powershell'
,
[
]
,
false
,
undefined
,
{
LEFT_QUOTE
:
` hello ${ leftSingleQuotationMark} world `
}
)
.
trim
(
)
,
prepareCommand
(
'powershell'
,
[
]
,
false
,
undefined
,
{
RIGHT_QUOTE
:
` hello ${ rightSingleQuotationMark} world `
}
)
.
trim
(
)
,
prepareCommand
(
'powershell'
,
[
]
,
false
,
undefined
,
{
TRAILING
:
'C:\\work\\'
}
)
.
trim
(
)
,
prepareCommand
(
'powershell'
,
[
]
,
false
,
undefined
,
{
BACKSLASH_QUOTE
:
'C:\\it\'s\\path\\'
}
)
.
trim
(
)
,
]
,
[
'${env:SIMPLE}=\'hello\';'
,
'${env:SPACES}=\'hello world\';'
,
'${env:EMPTY}=\'\';'
,
'${env:QUOTE}=\'hello\'\'world\';'
,
'${env:MULTI}=\'it\'\'s \'\'ok\'\'\';'
,
` \${env:LEFT_QUOTE}='hello ${ leftSingleQuotationMark} ${ leftSingleQuotationMark} world'; `
,
` \${env:RIGHT_QUOTE}='hello ${ rightSingleQuotationMark} ${ rightSingleQuotationMark} world'; `
,
'${env:TRAILING}=\'C:\\work\\\';'
,
'${env:BACKSLASH_QUOTE}=\'C:\\it\'\'s\\path\\\';'
,
]
)
;
}
)
;
}
)
;