diff options
author | Joey Hess <joey@kitenet.net> | 2011-12-22 20:14:35 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-12-23 01:05:16 -0400 |
commit | cba3ce08dfaa3318aa80b414e4d6d4f40d843d15 (patch) | |
tree | cdb54dd767cb1530c88b92277b1150f961d06012 /test.hs | |
parent | a0872a8ec34894689489dd0cf47887d8609b9f47 (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.hs | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 |