diff options
| author | tv <tv@krebsco.de> | 2025-03-13 21:25:55 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2025-07-21 14:57:09 +0200 |
| commit | 50ae155a7fc075694eba6edc2cbc5419ed2731b7 (patch) | |
| tree | e9d6615a5f09a07eb81cb67ac17e34cad0399c1b /test | |
| parent | af3f29bf9a8bbebe707802813a007f1cd02daaf8 (diff) | |
add normalization
Diffstat (limited to 'test')
| -rw-r--r-- | test/Spec.hs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Spec.hs b/test/Spec.hs index f42712a..6cf4d2f 100644 --- a/test/Spec.hs +++ b/test/Spec.hs @@ -35,6 +35,14 @@ main = property $ \(x :: Blessings String) -> x <> mempty == x && x == mempty <> x + it "pp (normalize x) == pp x" $ + property $ \(x :: Blessings String) -> + pp (stripSGR (normalize x)) == pp (stripSGR x) + + it "take 1 x <> drop 1 x == x" $ + property $ \(x :: Blessings String) -> + normalize (B.take 1 x <> B.drop 1 x) == normalize x + let infx = mconcat (repeat (Plain "x" :: Blessings String)) it "can take from infinite structure" $ |
