summaryrefslogtreecommitdiffhomepage
path: root/test/Xmobar/Plugins
diff options
context:
space:
mode:
Diffstat (limited to 'test/Xmobar/Plugins')
-rw-r--r--test/Xmobar/Plugins/Monitors/CpuSpec.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/Xmobar/Plugins/Monitors/CpuSpec.hs b/test/Xmobar/Plugins/Monitors/CpuSpec.hs
index c8d7867..f7e7f97 100644
--- a/test/Xmobar/Plugins/Monitors/CpuSpec.hs
+++ b/test/Xmobar/Plugins/Monitors/CpuSpec.hs
@@ -20,7 +20,7 @@ spec =
do let args = ["-L","3","-H","50","--normal","green","--high","red", "-t", "Cpu: <total>%"]
cpuArgs <- getArguments args
cpuValue <- runCpu cpuArgs
- cpuValue `shouldSatisfy` (\item -> "Cpu:" `isPrefixOf` item)
+ cpuValue `shouldSatisfy` (=~ "Cpu: [0-9]+%")
it "works with bar template" $
do let args = ["-L","3","-H","50","--normal","green","--high","red", "-t", "Cpu: <total>% <bar>"]
cpuArgs <- getArguments args
@@ -40,4 +40,4 @@ spec =
do let args = ["-L","3","-H","50","--normal","green","--high","red", "-t", "Cpu: <user> <nice> <iowait>"]
cpuArgs <- getArguments args
cpuValue <- runCpu cpuArgs
- cpuValue `shouldSatisfy` (\item -> "Cpu:" `isPrefixOf` cpuValue)
+ cpuValue `shouldSatisfy` (=~ "Cpu: [0-9][0-9]? [0-9][0-9]? [0-9][0-9]?")