Skip to content

Commit fc71e92

Browse files
committed
Drop Posix-only compressFile test, keep safeSeparators unit tests
1 parent c378485 commit fc71e92

1 file changed

Lines changed: 0 additions & 20 deletions

File tree

test/App/Fossa/VendoredDependencySpec.hs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
{-# LANGUAGE CPP #-}
21
{-# LANGUAGE TemplateHaskell #-}
32

43
module App.Fossa.VendoredDependencySpec (
@@ -17,14 +16,8 @@ import App.Fossa.VendoredDependency (
1716
import Control.Carrier.Lift (sendIO)
1817
import Control.Effect.Path (withSystemTempDir)
1918
import Path (Abs, Dir, Path, mkRelDir, (</>))
20-
#ifndef mingw32_HOST_OS
21-
import Path (mkRelFile, toFilePath)
22-
#endif
2319
import Path.IO (getCurrentDir)
2420
import Test.Effect (it', shouldContain')
25-
#ifndef mingw32_HOST_OS
26-
import Test.Effect (shouldStartWith')
27-
#endif
2821
import Test.Fixtures qualified as Fixtures
2922
import Test.Hspec (Spec, describe, it, runIO, shouldBe)
3023

@@ -50,19 +43,6 @@ spec = do
5043
compressedFilePath <- sendIO $ withSystemTempDir "fossa-temp" (flippedCompressFile specDir fileToTar)
5144
compressedFilePath `shouldContain'` fileToTar
5245

53-
#ifndef mingw32_HOST_OS
54-
-- Posix-only: safeSeparators uses System.FilePath.Posix, and the customer
55-
-- bug only manifests for Posix-style absolute paths produced by meta-fossa.
56-
it' "should write the tarball inside outputDir when fileToTar is absolute" $
57-
do
58-
let specDir = currDir </> $(mkRelDir "test/ArchiveUploader/normal")
59-
let absFile = toFilePath (specDir </> $(mkRelFile "foo"))
60-
(outDirStr, compressedFilePath) <-
61-
sendIO . withSystemTempDir "fossa-temp" $ \out ->
62-
(toFilePath out,) <$> compressFile out specDir absFile
63-
compressedFilePath `shouldStartWith'` outDirStr
64-
#endif
65-
6646
describe "safeSeparators" $ do
6747
it "joins relative path components with underscores" $
6848
safeSeparators "build/base-files" `shouldBe` "build_base-files"

0 commit comments

Comments
 (0)