mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 02:58:56 +01:00
leverage Fig's shell parser, add git spec (#240001)
Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com> Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>
This commit is contained in:
@@ -18,6 +18,7 @@ import { mkdirTestSuiteSpec } from './completions/upstream/mkdir.test';
|
||||
import { rmTestSuiteSpec } from './completions/upstream/rm.test';
|
||||
import { rmdirTestSuiteSpec } from './completions/upstream/rmdir.test';
|
||||
import { touchTestSuiteSpec } from './completions/upstream/touch.test';
|
||||
import { gitTestSuiteSpec } from './completions/upstream/git.test';
|
||||
import { osIsWindows } from '../helpers/os';
|
||||
import codeCompletionSpec from '../completions/code';
|
||||
import { figGenericTestSuites } from './fig.test';
|
||||
@@ -49,6 +50,7 @@ const testSpecs2: ISuiteSpec[] = [
|
||||
rmTestSuiteSpec,
|
||||
rmdirTestSuiteSpec,
|
||||
touchTestSuiteSpec,
|
||||
gitTestSuiteSpec,
|
||||
];
|
||||
|
||||
if (osIsWindows()) {
|
||||
@@ -97,13 +99,15 @@ suite('Terminal Suggest', () => {
|
||||
availableCommands.map(c => { return { label: c }; }),
|
||||
prefix,
|
||||
getTokenType(terminalContext, undefined),
|
||||
testPaths.cwd
|
||||
testPaths.cwd,
|
||||
{},
|
||||
'testName'
|
||||
);
|
||||
deepStrictEqual(result.items.map(i => i.label).sort(), (testSpec.expectedCompletions ?? []).sort());
|
||||
strictEqual(result.filesRequested, filesRequested);
|
||||
strictEqual(result.foldersRequested, foldersRequested);
|
||||
strictEqual(result.filesRequested, filesRequested, 'Files requested different than expected, got: ' + result.filesRequested);
|
||||
strictEqual(result.foldersRequested, foldersRequested, 'Folders requested different than expected, got: ' + result.foldersRequested);
|
||||
if (testSpec.expectedResourceRequests?.cwd) {
|
||||
strictEqual(result.cwd?.fsPath, testSpec.expectedResourceRequests.cwd.fsPath);
|
||||
strictEqual(result.cwd?.fsPath, testSpec.expectedResourceRequests.cwd.fsPath, 'Non matching cwd');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user