summaryrefslogtreecommitdiff
path: root/test/Main.hs
diff options
context:
space:
mode:
authorstuebinm2024-06-08 00:22:17 +0200
committerstuebinm2024-06-08 00:22:17 +0200
commit33bce0badbeb834cf8c584df56c424fe1c9bff7a (patch)
treeb4e1fbf82e7ea6b9db5bceec471fe36fc4cf7c90 /test/Main.hs
parentd10c2f0dac08fb2cf0a7df2fb6a745a4759a73cf (diff)
quasi-quotes for config keys
Diffstat (limited to 'test/Main.hs')
-rw-r--r--test/Main.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/Main.hs b/test/Main.hs
index 1af3d9a..2b96ac9 100644
--- a/test/Main.hs
+++ b/test/Main.hs
@@ -3,6 +3,7 @@
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE ApplicativeDo #-}
+{-# LANGUAGE QuasiQuotes #-}
module Main (main) where
import Conftrack
@@ -87,15 +88,16 @@ prop_aeson_nested = roundtripVia nestedToJson
prop_flat_keys :: Property
prop_flat_keys = monadicIO $ do
keys <- run $ configKeysOf @TestFlat
- assert (null (keys \\ [ Key ["foo"], Key ["bar"] ]))
+ assert (null (keys \\ [ [key|foo|], [key|bar|] ]))
prop_nested_keys :: Property
prop_nested_keys = monadicIO $ do
keys <- run $ configKeysOf @TestNested
- assert (null (keys \\ [ Key ["foo"], Key ["nested", "bar"], Key ["nested", "foo"] ]))
+ assert (null (keys \\ [ [key|foo|], [key|nested.bar|], [key|nested.foo|] ]))
-- see quickcheck docs for why this return is here
return []
+runTests :: IO Bool
runTests = $quickCheckAll
main :: IO ()