mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 19:42:56 +01:00
Fix tests
This commit is contained in:
parent
76f0f15077
commit
59cf966107
2 changed files with 78 additions and 78 deletions
|
|
@ -83,7 +83,7 @@ testTokenization('clojure', [
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
line: '#x03BB',
|
line: '0xff',
|
||||||
tokens: [{ startIndex: 0, type: 'number.hex.clj' }],
|
tokens: [{ startIndex: 0, type: 'number.hex.clj' }],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -8,84 +8,84 @@
|
||||||
import { testTokenization } from '../test/testRunner';
|
import { testTokenization } from '../test/testRunner';
|
||||||
|
|
||||||
testTokenization('scheme', [
|
testTokenization('scheme', [
|
||||||
// Keywords
|
// Keywords
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
line: 'define-macro some',
|
line: 'define-macro some',
|
||||||
tokens: [
|
tokens: [
|
||||||
{ startIndex: 0, type: 'keyword.scheme' },
|
{ startIndex: 0, type: 'keyword.scheme' },
|
||||||
{ startIndex: 12, type: 'white.scheme' },
|
{ startIndex: 12, type: 'white.scheme' },
|
||||||
{ startIndex: 13, type: 'variable.scheme' },
|
{ startIndex: 13, type: 'variable.scheme' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
// comments
|
// comments
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
line: '; comment',
|
line: '; comment',
|
||||||
tokens: [{ startIndex: 0, type: 'comment.scheme' }],
|
tokens: [{ startIndex: 0, type: 'comment.scheme' }],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
line: '|# comment',
|
line: '#| comment',
|
||||||
tokens: [{ startIndex: 0, type: 'comment.scheme' }],
|
tokens: [{ startIndex: 0, type: 'comment.scheme' }],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
line: 'multiline',
|
line: 'multiline',
|
||||||
tokens: [{ startIndex: 0, type: 'comment.scheme' }],
|
tokens: [{ startIndex: 0, type: 'comment.scheme' }],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
line: '#| cons',
|
line: '|# cons',
|
||||||
tokens: [
|
tokens: [
|
||||||
{ startIndex: 0, type: 'comment.scheme' },
|
{ startIndex: 0, type: 'comment.scheme' },
|
||||||
{ startIndex: 2, type: 'white.scheme' },
|
{ startIndex: 2, type: 'white.scheme' },
|
||||||
{ startIndex: 3, type: 'keyword.scheme' },
|
{ startIndex: 3, type: 'keyword.scheme' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
// strings
|
// strings
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
line: '"\\n string "',
|
line: '"\\n string "',
|
||||||
tokens: [
|
tokens: [
|
||||||
{ startIndex: 0, type: 'string.scheme' },
|
{ startIndex: 0, type: 'string.scheme' },
|
||||||
{ startIndex: 1, type: 'string.escape.scheme' },
|
{ startIndex: 1, type: 'string.escape.scheme' },
|
||||||
{ startIndex: 3, type: 'string.scheme' },
|
{ startIndex: 3, type: 'string.scheme' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
line: '" string \\',
|
line: '" string \\',
|
||||||
tokens: [{ startIndex: 0, type: 'string.scheme' }],
|
tokens: [{ startIndex: 0, type: 'string.scheme' }],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
line: 'multiline',
|
line: 'multiline',
|
||||||
tokens: [{ startIndex: 0, type: 'string.scheme' }],
|
tokens: [{ startIndex: 0, type: 'string.scheme' }],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
line: ' ',
|
line: ' ',
|
||||||
tokens: [
|
tokens: [
|
||||||
// previous line needs to be terminated with \
|
// previous line needs to be terminated with \
|
||||||
{ startIndex: 0, type: 'white.scheme' },
|
{ startIndex: 0, type: 'white.scheme' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
// numbers
|
// numbers
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
line: '1e2',
|
line: '1e2',
|
||||||
tokens: [{ startIndex: 0, type: 'number.float.scheme' }],
|
tokens: [{ startIndex: 0, type: 'number.float.scheme' }],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
line: '#x03BB',
|
line: '#x03BB',
|
||||||
tokens: [{ startIndex: 0, type: 'number.hex.scheme' }],
|
tokens: [{ startIndex: 0, type: 'number.hex.scheme' }],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue