1+ {-# LANGUAGE CPP #-}
12{-# LANGUAGE TemplateHaskell #-}
23
34module App.Fossa.VendoredDependencySpec (
@@ -15,9 +16,15 @@ import App.Fossa.VendoredDependency (
1516 )
1617import Control.Carrier.Lift (sendIO )
1718import Control.Effect.Path (withSystemTempDir )
18- import Path (Abs , Dir , Path , mkRelDir , mkRelFile , toFilePath , (</>) )
19+ import Path (Abs , Dir , Path , mkRelDir , (</>) )
20+ #ifndef mingw32_HOST_OS
21+ import Path (mkRelFile , toFilePath )
22+ #endif
1923import Path.IO (getCurrentDir )
20- import Test.Effect (it' , shouldContain' , shouldStartWith' )
24+ import Test.Effect (it' , shouldContain' )
25+ #ifndef mingw32_HOST_OS
26+ import Test.Effect (shouldStartWith' )
27+ #endif
2128import Test.Fixtures qualified as Fixtures
2229import Test.Hspec (Spec , describe , it , runIO , shouldBe )
2330
@@ -43,6 +50,9 @@ spec = do
4350 compressedFilePath <- sendIO $ withSystemTempDir " fossa-temp" (flippedCompressFile specDir fileToTar)
4451 compressedFilePath `shouldContain'` fileToTar
4552
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.
4656 it' " should write the tarball inside outputDir when fileToTar is absolute" $
4757 do
4858 let specDir = currDir </> $ (mkRelDir " test/ArchiveUploader/normal" )
@@ -51,6 +61,7 @@ spec = do
5161 sendIO . withSystemTempDir " fossa-temp" $ \ out ->
5262 (toFilePath out,) <$> compressFile out specDir absFile
5363 compressedFilePath `shouldStartWith'` outDirStr
64+ #endif
5465
5566 describe " safeSeparators" $ do
5667 it " joins relative path components with underscores" $
0 commit comments