blob: 328f5dffd6c6b8976aea43c40f5059b1979b6bdd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
module Sound.MusicDirTrans.DirectorySpec
( spec
)
where
import Test.Hspec
import Sound.MusicDirTrans
import Sound.MusicDirTrans.Test.Util
spec :: Spec
spec = do
describe "getTracksInDir" $ do
it "should get the tracks in a directory" $ do
files <- getTracksInDir "audio-samples"
files `shouldBe` audioTracks
describe "genArtistPathFromTracks" $ do
it "should get the tracks in a directory" $ do
ap <- genArtistPathFromTracks "audio-samples"
ap `shouldBe` metadataArtistPath
describe "mkRevertArtistPath" $ do
it "should create the dir.orig.name.txt path" $ do
mkRevertArtistPath "/tmp/audio-samples" "audio-samples-revert"
`shouldBe` ArtistPath "/tmp/audio-samples" "" "//tmp/audio-samples-revert"
describe "revertFile" $ do
it "should represent the filemane - dir.orig.name.txt" $ do
revertFile `shouldBe` "dir.orig.name.txt"
|