@@ -55,8 +55,8 @@ basicCompleterTests =
5555 doc <- openDoc " main-is.cabal" " cabal"
5656 compls <- getCompletions doc (Position 10 12 )
5757 let complTexts = getTextEditTexts compls
58- liftIO $ assertBool " suggests f2" $ " ./ f2.hs" `elem` complTexts
59- liftIO $ assertBool " does not suggest" $ " ./ Content.hs" `notElem` complTexts
58+ liftIO $ assertBool " suggests f2" $ " f2.hs" `elem` complTexts
59+ liftIO $ assertBool " does not suggest" $ " Content.hs" `notElem` complTexts
6060 ]
6161 where
6262 getTextEditTexts :: [CompletionItem ] -> [T. Text ]
@@ -66,21 +66,21 @@ fileCompleterTests :: TestTree
6666fileCompleterTests =
6767 testGroup
6868 " File Completer Tests"
69- [ testCase " Current Directory" $ do
69+ [ testCase " Current Directory - no leading ./ by default " $ do
7070 completions <- completeFilePath " " filePathComplTestDir
71- completions @?== [" ./. hidden" , " ./ Content.hs" , " ./ dir1/" , " ./ dir2/" , " ./ textfile.txt" , " ./ main-is.cabal" ],
71+ completions @?== [" .hidden" , " Content.hs" , " dir1/" , " dir2/" , " textfile.txt" , " main-is.cabal" ],
7272 testCase " Current Directory - alternative writing" $ do
7373 completions <- completeFilePath " ./" filePathComplTestDir
7474 completions @?== [" ./.hidden" , " ./Content.hs" , " ./dir1/" , " ./dir2/" , " ./textfile.txt" , " ./main-is.cabal" ],
7575 testCase " Current Directory - hidden file start" $ do
7676 completions <- completeFilePath " ." filePathComplTestDir
77- completions @?== [" ./ Content.hs" , " ./. hidden" , " ./ textfile.txt" , " ./ main-is.cabal" ],
77+ completions @?== [" Content.hs" , " .hidden" , " textfile.txt" , " main-is.cabal" ],
7878 testCase " Current Directory - incomplete directory path written" $ do
7979 completions <- completeFilePath " di" filePathComplTestDir
80- completions @?== [" ./ dir1/" , " ./ dir2/" ],
80+ completions @?== [" dir1/" , " dir2/" ],
8181 testCase " Current Directory - incomplete filepath written" $ do
8282 completions <- completeFilePath " te" filePathComplTestDir
83- completions @?== [" ./ Content.hs" , " ./ textfile.txt" ],
83+ completions @?== [" Content.hs" , " textfile.txt" ],
8484 testCase " Subdirectory" $ do
8585 completions <- completeFilePath " dir1/" filePathComplTestDir
8686 completions @?== [" dir1/f1.txt" , " dir1/f2.hs" ],
@@ -165,15 +165,15 @@ directoryCompleterTests :: TestTree
165165directoryCompleterTests =
166166 testGroup
167167 " Directory Completer Tests"
168- [ testCase " Current Directory" $ do
168+ [ testCase " Current Directory - no leading ./ by default " $ do
169169 completions <- completeDirectory " " filePathComplTestDir
170- completions @?== [" ./ dir1/" , " ./ dir2/" ],
170+ completions @?== [" dir1/" , " dir2/" ],
171171 testCase " Current Directory - alternative writing" $ do
172172 completions <- completeDirectory " ./" filePathComplTestDir
173173 completions @?== [" ./dir1/" , " ./dir2/" ],
174174 testCase " Current Directory - incomplete directory path written" $ do
175175 completions <- completeDirectory " di" filePathComplTestDir
176- completions @?== [" ./ dir1/" , " ./ dir2/" ],
176+ completions @?== [" dir1/" , " dir2/" ],
177177 testCase " Current Directory - incomplete filepath written" $ do
178178 completions <- completeDirectory " te" filePathComplTestDir
179179 completions @?== [] ,
0 commit comments