ssh-known-hosts 0.1.0.0 → 0.1.1.0
raw patch · 3 files changed
+22/−6 lines, 3 filesdep +unixPVP ok
version bump matches the API change (PVP)
Dependencies added: unix
API changes (from Hackage documentation)
Files
- CHANGELOG.md +9/−0
- ssh-known-hosts.cabal +4/−2
- test/test_ssh_known_hosts.hs +9/−4
+ CHANGELOG.md view
@@ -0,0 +1,9 @@+Series 0+---------++ * 0.1.1.0+ * Fix test to not require existing user .ssh/known_hosts file.+ * Added separate changelog++ * 0.1.0.0 -- initial release+
ssh-known-hosts.cabal view
@@ -1,5 +1,5 @@ name: ssh-known-hosts-version: 0.1.0.0+version: 0.1.1.0 synopsis: Read and interpret the SSH known-hosts file description:@@ -18,6 +18,8 @@ build-type: Simple cabal-version: >=1.10 +data-files: CHANGELOG.md+ library hs-source-dirs: src exposed-modules: Network.SSH.KnownHosts@@ -45,7 +47,7 @@ build-depends: base, HUnit, QuickCheck, text, iproute , test-framework, test-framework-hunit , test-framework-quickcheck2- , ssh-known-hosts+ , ssh-known-hosts, unix source-repository head type: darcs
test/test_ssh_known_hosts.hs view
@@ -2,11 +2,13 @@ module Main where +import Control.Monad (when) import Data.IP.Internal import Data.Monoid ((<>)) import qualified Data.Text as T import Network.SSH.KnownHosts import System.Environment+import System.Posix.Files (fileExist) import Test.Framework import Test.Framework.Providers.HUnit import Test.Framework.Providers.QuickCheck2@@ -84,10 +86,13 @@ ] testReadFile = testCase "read file" $- do h <- readKnownHosts- home <- getEnv "HOME"- l <- lines <$> readFile (home <> "/.ssh/known_hosts")- length h @?= length l+ do home <- getEnv "HOME"+ let userfile = home <> "/.ssh/known_hosts"+ haveUserFile <- fileExist userfile+ when (haveUserFile) $ do+ l <- lines <$> readFile userfile+ h <- readKnownHosts+ length h @?= length l testParse1 = testCase "empty parse" $ parseRemotes (T.pack "") @?= []