diff options
Diffstat (limited to 'test/test_hover_parsing.vader')
-rw-r--r-- | test/test_hover_parsing.vader | 36 |
1 files changed, 26 insertions, 10 deletions
diff --git a/test/test_hover_parsing.vader b/test/test_hover_parsing.vader index 4129c26a..221b42ac 100644 --- a/test/test_hover_parsing.vader +++ b/test/test_hover_parsing.vader @@ -35,12 +35,12 @@ Execute(A string with a code fence should be handled): \ [ \ [ \ 'unlet! b:current_syntax', - \ 'syntax include @ALE_hover_python syntax/python.vim', + \ 'syntax include @ALE_hover_javascript syntax/javascript.vim', \ 'unlet! b:current_syntax', - \ 'syntax include @ALE_hover_typescript syntax/typescript.vim', + \ 'syntax include @ALE_hover_python syntax/python.vim', \ 'syntax region ALE_hover_1 start=/\%1l/ end=/\%3l/ contains=@ALE_hover_python', \ 'syntax region ALE_hover_2 start=/\%5l/ end=/\%8l/ contains=@ALE_hover_python', - \ 'syntax region ALE_hover_3 start=/\%8l/ end=/\%10l/ contains=@ALE_hover_typescript', + \ 'syntax region ALE_hover_3 start=/\%8l/ end=/\%10l/ contains=@ALE_hover_javascript', \ ], \ [ \ 'def foo():', @@ -64,7 +64,7 @@ Execute(A string with a code fence should be handled): \ 'def bar():', \ ' pass', \ '```', - \ '```typescript', + \ '```javascript', \ 'const baz = () => undefined', \ '```', \ ], "\n")) @@ -74,12 +74,12 @@ Execute(Multiple strings with fences should be handled): \ [ \ [ \ 'unlet! b:current_syntax', - \ 'syntax include @ALE_hover_python syntax/python.vim', + \ 'syntax include @ALE_hover_javascript syntax/javascript.vim', \ 'unlet! b:current_syntax', - \ 'syntax include @ALE_hover_typescript syntax/typescript.vim', + \ 'syntax include @ALE_hover_python syntax/python.vim', \ 'syntax region ALE_hover_1 start=/\%1l/ end=/\%3l/ contains=@ALE_hover_python', \ 'syntax region ALE_hover_2 start=/\%5l/ end=/\%8l/ contains=@ALE_hover_python', - \ 'syntax region ALE_hover_3 start=/\%8l/ end=/\%10l/ contains=@ALE_hover_typescript', + \ 'syntax region ALE_hover_3 start=/\%8l/ end=/\%10l/ contains=@ALE_hover_javascript', \ ], \ [ \ 'def foo():', @@ -106,7 +106,7 @@ Execute(Multiple strings with fences should be handled): \ 'def bar():', \ ' pass', \ '```', - \ '```typescript', + \ '```javascript', \ 'const baz = () => undefined', \ '```', \ ], "\n"), @@ -124,7 +124,7 @@ Execute(Objects with kinds should be handled): \ 'def foo():', \ ' pass', \ '', - \ '```typescript', + \ '```javascript', \ 'const baz = () => undefined', \ '```', \ ], @@ -142,7 +142,7 @@ Execute(Objects with kinds should be handled): \ { \ 'kind': 'plaintext', \ 'value': join([ - \ '```typescript', + \ '```javascript', \ 'const baz = () => undefined', \ '```', \ ], "\n"), @@ -171,3 +171,19 @@ Execute(Simple markdown formatting should be handled): \ '```', \ 'formatted \_ line \_', \ ], "\n")) + +Execute(Non-existent syntax files shouldn't be loaded): + AssertEqual + \ [ + \ [ + \ 'syntax region ALE_hover_1 start=/\%1l/ end=/\%2l/ contains=@ALE_hover_text', + \ ], + \ [ + \ 'hello', + \ ], + \ ], + \ ale#hover#ParseLSPResult(join([ + \ '```text', + \ 'hello', + \ '```', + \ ], "\n")) |