Autodesk-AutoCAD / AutoLispExt

Visual Studio Code Extension for AutoCAD® AutoLISP
https://marketplace.visualstudio.com/items?itemName=Autodesk.autolispext
Apache License 2.0
87 stars 30 forks source link

Add test cases for autocompletion #127

Closed nigma456 closed 3 years ago

nigma456 commented 3 years ago
Objective

Add test cases for lisp extension Autocompletion feature

Abstractions
  1. Change the fs.readFile to fs.readFileSync so that the variables [internalLispFuncs,internalDclKeys etc] can got value before the mocha test. This may impact a little bit performance of launch extension for end client users but this delay will be very tiny.

  2. Cover getCmdAndVarsCompletionCandidates() and getLispAndDclCompletions()

  3. Does not cover getMatchingWord() since it is related to vscode editor and it will return error when running into the method document.getWordRangeAtPosition(position) after I created and opened a lisp file to test.

  4. Need to run on Mac os to verify since there are difference between Mac and Win32 OS.

  5. After the submission the code coverage for autocompletion will be 53%

image

Tests performed

Passed Local and Github CI

Screen shot