Skip to content

Commit

Permalink
added a test to reproduce #321
Browse files Browse the repository at this point in the history
  • Loading branch information
nevrome committed Nov 21, 2024
1 parent 682f6ba commit b862fdb
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/Poseidon/InterfaceSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import Test.Hspec
spec :: Spec
spec = do
testParseInGenoOne
testParseInGenoSep
testSplitExtensionsOptGz

runParser :: OP.Parser a -> [String] -> Maybe a
Expand All @@ -29,6 +30,19 @@ testParseInGenoOne = describe
"path/to/file.bim.gz" Nothing
"path/to/file.fam" Nothing)

testParseInGenoSep :: Spec
testParseInGenoSep = describe
"Poseidon.OptparseApplicativeParsers.parseInGenoSep" $ do
it "should return the expected paths for EIGENSTRAT data" $ do
runParser parseInGenoSep [
"--genoFile", "path/to/file.test.geno.gz"
, "--snpFile", "path/to/file.snp"
, "--indFile", "path/to/file.ind"
] `shouldBe`
Just (GenotypeEigenstrat "path/to/file.test.geno.gz" Nothing
"path/to/file.snp" Nothing
"path/to/file.ind" Nothing)

testSplitExtensionsOptGz :: Spec
testSplitExtensionsOptGz = describe
"Poseidon.OptparseApplicativeParsers.testSplitExtensionsOptGz" $ do
Expand Down

0 comments on commit b862fdb

Please sign in to comment.