fix use of hifalutin terminology

This commit is contained in:
Joey Hess 2015-11-16 14:37:31 -04:00
parent be86081ff4
commit b0626230b7
Failed to extract signature
7 changed files with 29 additions and 29 deletions

View 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)

View 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

View 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

16
Test.hs
View file

@ -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

View 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

View 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)

View 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.