File tree Expand file tree Collapse file tree 5 files changed +14
-1
lines changed
Expand file tree Collapse file tree 5 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 99
1010# IDEs
1111.vscode
12+
13+ # Test suite
14+ tests /dummy-μασ
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ tested-with:
3535 GHC == 8.2.2
3636 GHC == 8.0.2
3737
38- extra-source-files : examples/Test.hs Changelog tests/dummy-μασ/bar tests/dummy-μασ/ςερτ
38+ extra-source-files : examples/Test.hs Changelog
3939
4040source-repository head
4141 type : git
@@ -154,6 +154,7 @@ test-suite haskeline-tests
154154 base >= 4.9 && < 4.23
155155 , containers >= 0.4 && < 0.9
156156 , bytestring >= 0.9 && < 0.13
157+ , directory
157158 , process >= 1.0 && < 1.7
158159 -- dependencies for test-suite
159160 , HUnit
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import Data.Word
1616import qualified Data.Text as T
1717import qualified Data.Text.Encoding as E
1818import Data.Monoid ((<>) )
19+ import System.Directory (createDirectoryIfMissing )
1920import System.Exit (exitFailure )
2021import System.Process (readProcess )
2122import Test.HUnit
@@ -34,6 +35,13 @@ legacyEncoding = False
3435whenLegacy :: BC. ByteString -> BC. ByteString
3536whenLegacy s = if legacyEncoding then s else B. empty
3637
38+ -- These files are used to test tab completion.
39+ makeTestFiles :: IO ()
40+ makeTestFiles = do
41+ createDirectoryIfMissing True " tests/dummy-μασ"
42+ writeFile " tests/dummy-μασ/bar" " "
43+ writeFile " tests/dummy-μασ/ςερτ" " "
44+
3745main :: IO ()
3846main = do
3947 -- forkProcess needs an absolute path to the binary.
@@ -45,6 +53,7 @@ main = do
4553 runInTTY = True ,
4654 environment = []
4755 }
56+ makeTestFiles
4857 result <- runTestTT $ test [interactionTests i, fileStyleTests i]
4958 when (errors result > 0 || failures result > 0 ) exitFailure
5059
You can’t perform that action at this time.
0 commit comments