Skip to content

Commit f509eee

Browse files
committed
Test command prompt environment
1 parent a4f164a commit f509eee

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/adapter.test.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,23 @@ function generateSuite(triple: string) {
9292
assert.ok(buildConfig.xml.value);
9393
});
9494

95+
test('command prompt env', async function () {
96+
let lldb = os.platform() != 'win32' ? 'lldb' : 'lldb.exe';
97+
let lldbPath = path.join(buildDir, 'lldb', 'bin', lldb);
98+
let consolePath = path.join(buildDir, 'adapter', 'scripts', 'console.py');
99+
let args = [
100+
'--no-lldbinit',
101+
'--one-line-before-file', 'command script import ' + consolePath,
102+
'--one-line-before-file', 'pip list',
103+
];
104+
let result = cp.spawnSync(lldbPath, args);
105+
if (result.status != 0 || result.stderr.toString().indexOf('ERROR:') >= 0) {
106+
console.log(result.stdout.toString())
107+
console.log(result.stderr.toString())
108+
assert.fail('pip check failed');
109+
}
110+
});
111+
95112
test('run program to the end', async function () {
96113
let terminatedAsync = ds.waitForEvent('terminated');
97114
await ds.launch({ name: this.test.title, program: debuggee });

0 commit comments

Comments
 (0)