From c72953df05259b20a7fc87117aefbbe284a376a1 Mon Sep 17 00:00:00 2001 From: Carlos Sosa Date: Sat, 18 Apr 2020 20:08:00 -0700 Subject: Initial commit v0.1.0 --- test/Sound/MusicDirTrans/FileSpec.hs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 test/Sound/MusicDirTrans/FileSpec.hs (limited to 'test/Sound/MusicDirTrans/FileSpec.hs') diff --git a/test/Sound/MusicDirTrans/FileSpec.hs b/test/Sound/MusicDirTrans/FileSpec.hs new file mode 100644 index 0000000..37f8851 --- /dev/null +++ b/test/Sound/MusicDirTrans/FileSpec.hs @@ -0,0 +1,25 @@ +module Sound.MusicDirTrans.FileSpec + ( spec + ) +where + +import Test.Hspec +import Sound.MusicDirTrans +import Sound.MusicDirTrans.Test.Util + +spec :: Spec +spec = do + describe "trackFilePatterns" $ do + it "should compile track file extensions patterns" $ do + trackFilePatterns `shouldBe` patterns + + describe "getMetadata" $ do + it "should gather track metadata" $ do + fileMetadata <- getMetadata "audio-samples/sample.flac" + sampleMetadata `shouldBe` fileMetadata + + describe "mkNewPathName" $ do + it "should create an Artist -> Album ArtistPath structure" $ do + mkArtistPath origPath metadata `shouldBe` artistPath + mkArtistPath origPath metadataWithoutYear + `shouldBe` artistPathWithoutYear -- cgit v1.3-2-g0d8e