Skip to content

Commit 978a2b5

Browse files
GregSavinbhufmann
authored andcommitted
Fix arg parsing tests
1 parent 0119bad commit 978a2b5

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/test/suite/argparse.test.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,30 @@ import * as argparse from '../../argparse';
55
suite('Argument Parser Test Suite', () => {
66
vscode.window.showInformationMessage('Start argument parser tests.');
77

8-
const prefix = 'Argument parser should be able to handle argument strings ';
8+
const prefix = 'Argument parser should be able to ';
99

10-
test(prefix + 'that do not use quoting', () => {
10+
test(prefix + 'handle argument strings that do not use quoting', () => {
1111
const args = argparse.parseArgs('-vmargs -Dsome.property=value_without_spaces');
1212
assert.deepEqual(args, ['-vmargs', '-Dsome.property=value_without_spaces']);
1313
});
1414

15-
test(prefix + 'that have extra whitespace between arguments', () => {
15+
test(prefix + 'handle argument strings that have extra whitespace between arguments', () => {
1616
const args = argparse.parseArgs(' -vmargs -Dsome.property=value_without_spaces \t ');
1717
assert.deepEqual(args, ['-vmargs', '-Dsome.property=value_without_spaces']);
1818
});
1919

20-
test(prefix + 'that use quoting', () => {
20+
test(prefix + 'handle argument strings that use quoting', () => {
2121
const args = argparse.parseArgs(' -vmargs -Dsome.property="value with spaces" \t ');
2222
assert.deepEqual(args, ['-vmargs', '-Dsome.property=value with spaces']);
2323
});
2424

25-
test(prefix + 'that use quotes with embedded literal quotes (using a sequence of 2 consecutive quotes)', () => {
26-
const args = argparse.parseArgs(' -vmargs -Dsome.property="""in literal quotes""" \t ');
27-
assert.deepEqual(args, ['-vmargs', '-Dsome.property="in literal quotes"']);
28-
});
29-
3025
test(prefix + 'recognize non-nested consecutive quotes as an empty string', () => {
3126
const parsed = argparse.parseArgs('empty_value=""');
3227
assert.deepEqual(parsed, ['empty_value=']);
3328
});
29+
30+
test(prefix + 'recognize nested consecutive quotes as a literal quote character', () => {
31+
const args = argparse.parseArgs(' -vmargs -Dsome.property="""in literal quotes""" \t ');
32+
assert.deepEqual(args, ['-vmargs', '-Dsome.property="in literal quotes"']);
33+
});
3434
});

0 commit comments

Comments
 (0)