mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-23 00:22:56 +01:00
Added tests for quoted strings and regexes using alternative delimiters
This commit is contained in:
parent
66b5497f3c
commit
6feaf43d1d
1 changed files with 35 additions and 0 deletions
|
|
@ -429,4 +429,39 @@ testTokenization('perl', [
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
|
// Quoted constructs
|
||||||
|
[
|
||||||
|
{
|
||||||
|
line: "m!can't!",
|
||||||
|
tokens: [
|
||||||
|
{ startIndex: 0, type: 'regexp.delim.perl' },
|
||||||
|
{ startIndex: 2, type: 'regexp.perl' },
|
||||||
|
{ startIndex: 7, type: 'regexp.delim.perl' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
|
||||||
|
[
|
||||||
|
{
|
||||||
|
line: 'q XfooX',
|
||||||
|
tokens: [
|
||||||
|
{ startIndex: 0, type: 'string.delim.perl' },
|
||||||
|
{ startIndex: 3, type: 'string.perl' },
|
||||||
|
{ startIndex: 6, type: 'string.delim.perl' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
|
||||||
|
[
|
||||||
|
{
|
||||||
|
line: 'qq(test $foo)',
|
||||||
|
tokens: [
|
||||||
|
{ startIndex: 0, type: 'string.delim.perl' },
|
||||||
|
{ startIndex: 3, type: 'string.perl' },
|
||||||
|
{ startIndex: 8, type: 'variable.perl' },
|
||||||
|
{ startIndex: 12, type: 'string.delim.perl' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
]);
|
]);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue