summaryrefslogtreecommitdiff
path: root/test.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-12-22 20:14:35 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-12-23 01:05:16 -0400
commitcba3ce08dfaa3318aa80b414e4d6d4f40d843d15 (patch)
treecdb54dd767cb1530c88b92277b1150f961d06012 /test.hs
parenta0872a8ec34894689489dd0cf47887d8609b9f47 (diff)
handle C-style escapes in Format
I was happily able to repurpose some code from Git.Filename to handle this. I remember writing that code... a whole afternoon at a coffee shop, after which I felt I'd struggled with Haskell and git, and sorta lost, in needing to write this nasty peice of code. But was also pleased at the use of a pair of functions and quickcheck that allowed me to get it 100% right. So, turns out I not only got it right, but the code wasn't as special-purpose as I'd feared. Yay!
Diffstat (limited to 'test.hs')
-rw-r--r--test.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/test.hs b/test.hs
index 75d169105..a2fa98e4d 100644
--- a/test.hs
+++ b/test.hs
@@ -45,6 +45,7 @@ import qualified Utility.Path
import qualified Utility.FileMode
import qualified Utility.Gpg
import qualified Build.SysConfig
+import qualified Utility.Format
-- for quickcheck
instance Arbitrary Types.Key.Key where
@@ -72,7 +73,8 @@ propigate (Counts { errors = e , failures = f }, _)
quickcheck :: Test
quickcheck = TestLabel "quickcheck" $ TestList
- [ qctest "prop_idempotent_deencode" Git.Filename.prop_idempotent_deencode
+ [ qctest "prop_idempotent_deencode_git" Git.Filename.prop_idempotent_deencode
+ , qctest "prop_idempotent_deencode" Utility.Format.prop_idempotent_deencode
, qctest "prop_idempotent_fileKey" Locations.prop_idempotent_fileKey
, qctest "prop_idempotent_key_read_show" Types.Key.prop_idempotent_key_read_show
, qctest "prop_idempotent_shellEscape" Utility.SafeCommand.prop_idempotent_shellEscape