1 import Test
.Cabal
.Prelude
2 import qualified Data
.ByteString
as BS
3 -- import qualified Data.ByteString.Base16 as BS16
4 -- import qualified Crypto.Hash.SHA256 as SHA256
8 -- Note: we cannot simply use `expectBroken` or `skip` or similar
9 -- becuase this test fails on imports (see #8357).
12 cabal
"v2-sdist" ["deterministic"]
14 let dir
= testCurrentDir env
15 knownSdist
= dir
</> "deterministic-0.tar.gz"
16 mySdist
= dir
</> "dist-newstyle" </> "sdist" </> "deterministic-0.tar.gz"
18 -- This helps to understand why this test fails, if it does:
20 -- shell "tar" ["-tzvf", knownSdist]
21 -- shell "tar" ["-tzvf", mySdist]
24 known
<- liftIO
(BS
.readFile knownSdist
)
25 unknown
<- liftIO
(BS
.readFile mySdist
)
27 skipIf
"#8356" True -- bogus, just to indicate that the test is skipped
28 assertEqual
"hashes didn't match for sdist" True True
29 -- assertEqual "hashes didn't match for sdist" (BS16.encode $ SHA256.hash known) (BS16.encode $ SHA256.hash unknown)