More work on merging completions with parse tree

This commit is contained in:
Kovid Goyal
2022-09-26 07:34:49 +05:30
parent bf74413c1f
commit 97716fea8b
16 changed files with 263 additions and 426 deletions

View File

@@ -39,10 +39,10 @@ func TestCompleteFiles(t *testing.T) {
}
sort.Strings(expected)
actual := make([]string, 0, len(expected))
complete_files(prefix, func(entry *FileEntry) {
actual = append(actual, entry.completion_candidate)
if _, err := os.Stat(entry.abspath); err != nil {
t.Fatalf("Abspath does not exist: %#v", entry.abspath)
CompleteFiles(prefix, func(entry *FileEntry) {
actual = append(actual, entry.CompletionCandidate)
if _, err := os.Stat(entry.Abspath); err != nil {
t.Fatalf("Abspath does not exist: %#v", entry.Abspath)
}
}, "")
sort.Strings(actual)