Allow using a base directory other than the cwd when completing files

This commit is contained in:
Kovid Goyal
2022-09-16 14:17:07 +05:30
parent c5afceb4cb
commit f657e6e916
3 changed files with 16 additions and 6 deletions

View File

@@ -44,7 +44,7 @@ func TestCompleteFiles(t *testing.T) {
if _, err := os.Stat(entry.abspath); err != nil {
t.Fatalf("Abspath does not exist: %#v", entry.abspath)
}
})
}, "")
sort.Strings(actual)
if !reflect.DeepEqual(expected, actual) {
t.Fatalf("Did not get expected completion candidates for prefix: %#v\nExpected: %#v\nActual: %#v", prefix, expected, actual)