diff options
author | Daniel Schüssler <933504+DanielSchuessler@users.noreply.github.com> | 2018-08-26 17:29:43 +0200 |
---|---|---|
committer | Daniel Schüssler <933504+DanielSchuessler@users.noreply.github.com> | 2018-10-06 19:53:10 +0200 |
commit | 31fa44e9aa4ba4d3db8688d785b766fd5e7cf8f1 (patch) | |
tree | 66c08503533c347b1917655bbd65911e4dff2616 /test/Plugins | |
parent | 9050163edf67f2f510c47a482b9c156f94e89275 (diff) | |
download | xmobar-31fa44e9aa4ba4d3db8688d785b766fd5e7cf8f1.tar.gz xmobar-31fa44e9aa4ba4d3db8688d785b766fd5e7cf8f1.tar.bz2 |
Turn the --monitor option to `Volume` into a new plugin `Alsa` instead
See #360.
Diffstat (limited to 'test/Plugins')
-rw-r--r-- | test/Plugins/Monitors/AlsaSpec.hs (renamed from test/Plugins/Monitors/VolumeSpec.hs) | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/test/Plugins/Monitors/VolumeSpec.hs b/test/Plugins/Monitors/AlsaSpec.hs index d724c21..a813c1d 100644 --- a/test/Plugins/Monitors/VolumeSpec.hs +++ b/test/Plugins/Monitors/AlsaSpec.hs @@ -1,5 +1,5 @@ {-# OPTIONS_GHC -Wall #-} -module Plugins.Monitors.VolumeSpec +module Plugins.Monitors.AlsaSpec ( main , spec ) where @@ -7,7 +7,7 @@ module Plugins.Monitors.VolumeSpec import Control.Concurrent import Control.Concurrent.Async import Control.Monad -import Plugins.Monitors.Volume +import Plugins.Monitors.Alsa import System.FilePath import System.IO import System.IO.Temp @@ -20,22 +20,18 @@ main = hspec spec spec :: Spec spec = do - describe "Volume.getWaitMonitor" $ - it "produces the expected timeline (using a fake alsactl)" $ - runFakeAlsactlTest + describe "Alsa.getWaitMonitor" $ + it "produces the expected timeline (using a fake alsactl)" + runFakeAlsactlTest - describe "Volume.parseOptsIncludingMonitorArgs" $ do + describe "Alsa.parseOptsIncludingMonitorArgs" $ do it "works with empty args" $ do opts <- parseOptsIncludingMonitorArgs [] - refreshMode opts `shouldBe` RefreshModePoll + aoAlsaCtlPath opts `shouldBe` Nothing - it "parses --monitor" $ do - opts <- parseOptsIncludingMonitorArgs ["--", "--monitor"] - refreshMode opts `shouldBe` RefreshModeMonitor Nothing - - it "parses --monitor=foo" $ do - opts <- parseOptsIncludingMonitorArgs ["--", "--monitor=foo"] - refreshMode opts `shouldBe` RefreshModeMonitor (Just "foo") + it "parses --alsactl=foo" $ do + opts <- parseOptsIncludingMonitorArgs ["--", "--alsactl=foo"] + aoAlsaCtlPath opts `shouldBe` Just "foo" runFakeAlsactlTest :: Expectation |