Skip to content

Commit

Permalink
Add a test to KOMA base suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
James-Yu committed Sep 6, 2024
1 parent 1e32ce9 commit 6533600
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/fixtures/armory/intellisense/koma.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\documentclass{scrartcl}
\begin{document}
\end{document}
11 changes: 11 additions & 0 deletions test/suites/04_intellisense.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -441,4 +441,15 @@ suite('Intellisense test suite', () => {
assert.ok(undefined === suggestions.items.find(item => item.label === '#+' && item.insertText instanceof vscode.SnippetString && item.insertText.value === '\\bigcup'))
assert.ok(undefined === suggestions.items.find(item => item.label === '#8'))
})

test.run('suggest base KOMAScript macros/envs in KOMAScript class', async (fixture: string) => {
await test.load(fixture, [
{src: 'intellisense/koma.tex', dst: 'main.tex'}
])
const suggestions = test.suggest(0, 1)
// in class-scrartcl.cwl
assert.ok(suggestions.labels.includes('\\addpart{}'))
// in base
assert.ok(suggestions.labels.includes('\\addchap{}'))
})
})

0 comments on commit 6533600

Please sign in to comment.