mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-28 04:23:32 +01:00
do not allow duplicate flags (#240292)
This commit is contained in:
@@ -41,8 +41,8 @@ export function createCodeTestSpecs(executable: string): ITestSpec[] {
|
||||
{ input: `${executable} --log |`, expectedCompletions: logOptions },
|
||||
{ input: `${executable} --sync |`, expectedCompletions: syncOptions },
|
||||
{ input: `${executable} --extensions-dir |`, expectedResourceRequests: { type: 'folders', cwd: testPaths.cwd } },
|
||||
{ input: `${executable} --list-extensions |`, expectedCompletions: codeSpecOptions, expectedResourceRequests: { type: 'both', cwd: testPaths.cwd } },
|
||||
{ input: `${executable} --show-versions |`, expectedCompletions: codeSpecOptions, expectedResourceRequests: { type: 'both', cwd: testPaths.cwd } },
|
||||
{ input: `${executable} --list-extensions |`, expectedCompletions: codeSpecOptions.filter(c => c !== '--list-extensions'), expectedResourceRequests: { type: 'both', cwd: testPaths.cwd } },
|
||||
{ input: `${executable} --show-versions |`, expectedCompletions: codeSpecOptions.filter(c => c !== '--show-versions'), expectedResourceRequests: { type: 'both', cwd: testPaths.cwd } },
|
||||
{ input: `${executable} --category |`, expectedCompletions: categoryOptions },
|
||||
{ input: `${executable} --category a|`, expectedCompletions: categoryOptions },
|
||||
|
||||
|
||||
@@ -72,8 +72,7 @@ export const lsTestSuiteSpec: ISuiteSpec = {
|
||||
{ input: 'ls -a|', expectedCompletions: allOptions },
|
||||
|
||||
// Duplicate option
|
||||
// TODO: Duplicate options should not be presented https://github.com/microsoft/vscode/issues/239607
|
||||
// { input: 'ls -a -|', expectedCompletions: removeArrayEntry(allOptions, '-a'), expectedResourceRequests: { type: 'both', cwd: testPaths.cwd } },
|
||||
{ input: 'ls -a -|', expectedCompletions: allOptions.filter(o => o !== '-a'), expectedResourceRequests: { type: 'both', cwd: testPaths.cwd } },
|
||||
|
||||
// Relative paths
|
||||
{ input: 'ls c|', expectedCompletions: allOptions, expectedResourceRequests: { type: 'both', cwd: testPaths.cwd } },
|
||||
@@ -89,3 +88,4 @@ export const lsTestSuiteSpec: ISuiteSpec = {
|
||||
{ input: 'ls ../sibling|', expectedCompletions: allOptions, expectedResourceRequests: { type: 'both', cwd: testPaths.cwdParent } },
|
||||
]
|
||||
};
|
||||
|
||||
|
||||
@@ -93,9 +93,8 @@ export const figGenericTestSuites: ISuiteSpec[] = [
|
||||
testSpecs: [
|
||||
{ input: 'foo |', expectedCompletions: ['--bar', '--baz'] },
|
||||
{ input: 'foo bar|', expectedCompletions: ['--bar', '--baz'] },
|
||||
// TODO: Duplicate options should not be presented https://github.com/microsoft/vscode/issues/239607
|
||||
// { input: 'foo --bar |', expectedCompletions: ['--baz'] },
|
||||
// { input: 'foo --baz |', expectedCompletions: ['--bar'] },
|
||||
{ input: 'foo --bar |', expectedCompletions: ['--baz'] },
|
||||
{ input: 'foo --baz |', expectedCompletions: ['--bar'] },
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user