fix use of hifalutin terminology
authorJoey Hess <joeyh@joeyh.name>
Mon, 16 Nov 2015 18:37:31 +0000 (14:37 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 16 Nov 2015 18:37:31 +0000 (14:37 -0400)
Git/Filename.hs
Locations.hs
Logs/Remote.hs
Test.hs
Types/Key.hs
Utility/Format.hs
Utility/SafeCommand.hs

index 382eb8d48d4438b7765d752c8a6759cd880f823e..ee84d488322a03b7f1ff19ff4e4d5376faeb2722 100644 (file)
@@ -24,5 +24,5 @@ encode :: FilePath -> String
 encode s = "\"" ++ encode_c s ++ "\""
 
 {- for quickcheck -}
-prop_idempotent_deencode :: String -> Bool
-prop_idempotent_deencode s = s == decode (encode s)
+prop_isomorphic_deencode :: String -> Bool
+prop_isomorphic_deencode s = s == decode (encode s)
index bcbac34db007269e7aa806cfc3eb71f9c91ab395..ba61151554bfa5c1ad089ccc07d34fe26a5bcb93 100644 (file)
@@ -67,7 +67,7 @@ module Locations (
        hashDirLower,
        preSanitizeKeyName,
 
-       prop_idempotent_fileKey
+       prop_isomorphic_fileKey
 ) where
 
 import Data.Char
@@ -437,8 +437,8 @@ fileKey file = file2key $
                replace "&c" ":" $ replace "%" "/" file
 
 {- for quickcheck -}
-prop_idempotent_fileKey :: String -> Bool
-prop_idempotent_fileKey s
+prop_isomorphic_fileKey :: String -> Bool
+prop_isomorphic_fileKey s
        | null s = True -- it's not legal for a key to have no keyName
        | otherwise= Just k == fileKey (keyFile k)
   where
index 91afa242b6701ce7d9770aa99b80b46a086caf9f..a90eb027ce034f86c7a0faeb1078ffe0b1280894 100644 (file)
@@ -14,7 +14,7 @@ module Logs.Remote (
        showConfig,
        parseConfig,
 
-       prop_idempotent_configEscape,
+       prop_isomorphic_configEscape,
        prop_parse_show_Config,
 ) where
 
@@ -84,8 +84,8 @@ configUnEscape = unescape
                rest = drop 1 r
 
 {- for quickcheck -}
-prop_idempotent_configEscape :: String -> Bool
-prop_idempotent_configEscape s = s == (configUnEscape . configEscape) s
+prop_isomorphic_configEscape :: String -> Bool
+prop_isomorphic_configEscape s = s == (configUnEscape . configEscape) s
 
 prop_parse_show_Config :: RemoteConfig -> Bool
 prop_parse_show_Config c
diff --git a/Test.hs b/Test.hs
index 44bede86ae8ddb580571c95ce6d6996784acc46f..5718b582114f20e21b94174fda33a267b7cbd85e 100644 (file)
--- a/Test.hs
+++ b/Test.hs
@@ -131,14 +131,14 @@ tests = testGroup "Tests"
 
 properties :: TestTree
 properties = localOption (QuickCheckTests 1000) $ testGroup "QuickCheck"
-       [ testProperty "prop_idempotent_deencode_git" Git.Filename.prop_idempotent_deencode
-       , testProperty "prop_idempotent_deencode" Utility.Format.prop_idempotent_deencode
-       , testProperty "prop_idempotent_fileKey" Locations.prop_idempotent_fileKey
-       , testProperty "prop_idempotent_key_encode" Types.Key.prop_idempotent_key_encode
-       , testProperty "prop_idempotent_key_decode" Types.Key.prop_idempotent_key_decode
-       , testProperty "prop_idempotent_shellEscape" Utility.SafeCommand.prop_idempotent_shellEscape
-       , testProperty "prop_idempotent_shellEscape_multiword" Utility.SafeCommand.prop_idempotent_shellEscape_multiword
-       , testProperty "prop_idempotent_configEscape" Logs.Remote.prop_idempotent_configEscape
+       [ testProperty "prop_isomorphic_deencode_git" Git.Filename.prop_isomorphic_deencode
+       , testProperty "prop_isomorphic_deencode" Utility.Format.prop_isomorphic_deencode
+       , testProperty "prop_isomorphic_fileKey" Locations.prop_isomorphic_fileKey
+       , testProperty "prop_isomorphic_key_encode" Types.Key.prop_isomorphic_key_encode
+       , testProperty "prop_isomorphic_key_decode" Types.Key.prop_isomorphic_key_decode
+       , testProperty "prop_isomorphic_shellEscape" Utility.SafeCommand.prop_isomorphic_shellEscape
+       , testProperty "prop_isomorphic_shellEscape_multiword" Utility.SafeCommand.prop_isomorphic_shellEscape_multiword
+       , testProperty "prop_isomorphic_configEscape" Logs.Remote.prop_isomorphic_configEscape
        , testProperty "prop_parse_show_Config" Logs.Remote.prop_parse_show_Config
        , testProperty "prop_upFrom_basics" Utility.Path.prop_upFrom_basics
        , testProperty "prop_relPathDirToFile_basics" Utility.Path.prop_relPathDirToFile_basics
index 06adc4b91912a52e41b59aeb23f0c53bf45709c7..164887a4df0697420cc477065ac15177477e8656 100644 (file)
@@ -18,8 +18,8 @@ module Types.Key (
        isChunkKey,
        isKeyPrefix,
 
-       prop_idempotent_key_encode,
-       prop_idempotent_key_decode
+       prop_isomorphic_key_encode,
+       prop_isomorphic_key_decode
 ) where
 
 import System.Posix.Types
@@ -135,11 +135,11 @@ instance Hashable Key where
        hashIO32 = hashIO32 . key2file
        hashIO64 = hashIO64 . key2file
 
-prop_idempotent_key_encode :: Key -> Bool
-prop_idempotent_key_encode k = Just k == (file2key . key2file) k
+prop_isomorphic_key_encode :: Key -> Bool
+prop_isomorphic_key_encode k = Just k == (file2key . key2file) k
 
-prop_idempotent_key_decode :: FilePath -> Bool
-prop_idempotent_key_decode f
+prop_isomorphic_key_decode :: FilePath -> Bool
+prop_isomorphic_key_decode f
        | normalfieldorder = maybe True (\k -> key2file k == f) (file2key f)
        | otherwise = True
   where
index 0a6f6ce7d91aecf1268915b2b3926269d5703017..7844963101cc330581035690e2cdf89781d21cb6 100644 (file)
@@ -11,7 +11,7 @@ module Utility.Format (
        format,
        decode_c,
        encode_c,
-       prop_idempotent_deencode
+       prop_isomorphic_deencode
 ) where
 
 import Text.Printf (printf)
@@ -174,5 +174,5 @@ encode_c' p = concatMap echar
        showoctal i = '\\' : printf "%03o" i
 
 {- for quickcheck -}
-prop_idempotent_deencode :: String -> Bool
-prop_idempotent_deencode s = s == decode_c (encode_c s)
+prop_isomorphic_deencode :: String -> Bool
+prop_isomorphic_deencode s = s == decode_c (encode_c s)
index 9102b7267946437371a0a6da74339bea1c189e1f..40d41c7a22666c2640a27d71d94800cdad5c3fe4 100644 (file)
@@ -105,10 +105,10 @@ shellUnEscape s = word : shellUnEscape rest
                | otherwise = inquote q (w++[c]) cs
 
 -- | For quickcheck.
-prop_idempotent_shellEscape :: String -> Bool
-prop_idempotent_shellEscape s = [s] == (shellUnEscape . shellEscape) s
-prop_idempotent_shellEscape_multiword :: [String] -> Bool
-prop_idempotent_shellEscape_multiword s = s == (shellUnEscape . unwords . map shellEscape) s
+prop_isomorphic_shellEscape :: String -> Bool
+prop_isomorphic_shellEscape s = [s] == (shellUnEscape . shellEscape) s
+prop_isomorphic_shellEscape_multiword :: [String] -> Bool
+prop_isomorphic_shellEscape_multiword s = s == (shellUnEscape . unwords . map shellEscape) s
 
 -- | Segments a list of filenames into groups that are all below the maximum
 --  command-line length limit.