Skip to content

Commit 8d54ae4

Browse files
committed
Test other-modules containing dots
1 parent f5f6995 commit 8d54ae4

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

test/Spec.hs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,13 @@ spec = do
9090
$ it "list with leading commas"
9191
$ ("one\n , two\n , three3" :: Text) ~> parseList 1
9292
`shouldParse` ["one", "two", "three3"]
93+
describe "Should Succeed"
94+
$ it "succesfully parses exe component with other-modules containing dots"
95+
$ exeSection2 ~> parseExe 0
96+
`shouldParse` [ Comp Exe "gen-hie" "app/Main.hs"
97+
, Comp Exe "gen-hie" "app/Hie/Executable/Helper.hs"
98+
, Comp Exe "gen-hie" "app/Hie/Executable/Utils.hs"
99+
]
93100

94101
exeSection :: Text
95102
exeSection =
@@ -175,3 +182,13 @@ libSection3 =
175182
\ , text\n\
176183
\ default-language: Haskell2010\n\
177184
\"
185+
186+
exeSection2 :: Text
187+
exeSection2 =
188+
"executable gen-hie\n\
189+
\ other-modules:\n\
190+
\ Hie.Executable.Helper\n\
191+
\ Hie.Executable.Utils\n\
192+
\ hs-source-dirs:\n\
193+
\ app\n\
194+
\ main-is: Main.hs \n"

0 commit comments

Comments
 (0)