From e316eac6c816111c11280aab79e9a058f86d902b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 16 Nov 2015 14:37:31 -0400 Subject: fix use of hifalutin terminology --- Git/Filename.hs | 4 ++-- Locations.hs | 6 +++--- Logs/Remote.hs | 6 +++--- Test.hs | 16 ++++++++-------- Types/Key.hs | 12 ++++++------ Utility/Format.hs | 6 +++--- Utility/SafeCommand.hs | 8 ++++---- 7 files changed, 29 insertions(+), 29 deletions(-) diff --git a/Git/Filename.hs b/Git/Filename.hs index 382eb8d48..ee84d4883 100644 --- a/Git/Filename.hs +++ b/Git/Filename.hs @@ -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) diff --git a/Locations.hs b/Locations.hs index bcbac34db..ba6115155 100644 --- a/Locations.hs +++ b/Locations.hs @@ -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 diff --git a/Logs/Remote.hs b/Logs/Remote.hs index 91afa242b..a90eb027c 100644 --- a/Logs/Remote.hs +++ b/Logs/Remote.hs @@ -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 44bede86a..5718b5821 100644 --- 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 diff --git a/Types/Key.hs b/Types/Key.hs index 06adc4b91..164887a4d 100644 --- a/Types/Key.hs +++ b/Types/Key.hs @@ -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 diff --git a/Utility/Format.hs b/Utility/Format.hs index 0a6f6ce7d..784496310 100644 --- a/Utility/Format.hs +++ b/Utility/Format.hs @@ -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) diff --git a/Utility/SafeCommand.hs b/Utility/SafeCommand.hs index 9102b7267..40d41c7a2 100644 --- a/Utility/SafeCommand.hs +++ b/Utility/SafeCommand.hs @@ -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. -- cgit v1.2.3