summaryrefslogtreecommitdiffhomepage
path: root/test/Xmobar
diff options
context:
space:
mode:
authorTomas Janousek <tomi@nomi.cz>2020-11-18 20:27:52 +0000
committerjao <jao@gnu.org>2020-11-19 13:38:15 +0000
commita071c2a49d0804e410cdc3aeb9c49b622c9a416a (patch)
tree1a180ef8e6f45b4d4f4b51041fb0ee1565c917ef /test/Xmobar
parent0cb56eb14e4e7c9257b290a8e22331d90145105c (diff)
downloadxmobar-a071c2a49d0804e410cdc3aeb9c49b622c9a416a.tar.gz
xmobar-a071c2a49d0804e410cdc3aeb9c49b622c9a416a.tar.bz2
test: Fix flaky CpuSpec
Failed at least once in GitHub Actions: predicate failed on: "Cpu: <fc=red>100</fc>% <fc=red>##########</fc>" Also, there's no need to guard the Xmobar.Plugins.Monitors.CpuSpec module with the with_alsa flag. (And it doesn't really work anyway, hspec-discover doesn't care about what modules are declared in cabal, so stack/ghc complains that "These modules are needed for compilation but not listed in your .cabal file's other-modules: Xmobar.Plugins.Monitors.AlsaSpec" and then fails to detect changes in those modules.)
Diffstat (limited to 'test/Xmobar')
-rw-r--r--test/Xmobar/Plugins/Monitors/CpuSpec.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/Xmobar/Plugins/Monitors/CpuSpec.hs b/test/Xmobar/Plugins/Monitors/CpuSpec.hs
index 449acd5..3d07dee 100644
--- a/test/Xmobar/Plugins/Monitors/CpuSpec.hs
+++ b/test/Xmobar/Plugins/Monitors/CpuSpec.hs
@@ -23,7 +23,7 @@ spec =
do let args = ["-L","3","-H","50","--normal","green","--high","red", "-t", "Cpu: <total>% <bar>"]
cpuArgs <- getArguments args
cpuValue <- runCpu cpuArgs
- cpuValue `shouldSatisfy` (\item -> "::" `isSuffixOf` item)
+ cpuValue `shouldSatisfy` (all (`elem` ":#") . last . words)
it "works with no icon pattern template" $
do let args = ["-L","3","-H","50","--normal","green","--high","red", "-t", "Cpu: <total>% <bar>", "--", "--load-icon-pattern", "<icon=bright_%%.xpm/>"]
cpuArgs <- getArguments args