From e13c5a99af0e06c4c050e7d69e2ef93f918445df Mon Sep 17 00:00:00 2001 From: Lei Zhu Date: Thu, 20 Jul 2023 23:09:14 +0800 Subject: [PATCH] Remove origin test to ghcup-test subdir --- ghcup.cabal | 2 +- test/{ => ghcup-test}/GHCup/ArbitraryTypes.hs | 0 .../GHCup/Prelude/File/Posix/TraversalsSpec.hs | 2 +- test/{ => ghcup-test}/GHCup/Types/JSONSpec.hs | 4 ++-- test/{ => ghcup-test}/GHCup/Utils/FileSpec.hs | 0 test/{ => ghcup-test}/Main.hs | 0 test/{ => ghcup-test}/Spec.hs | 0 test/{ => ghcup-test}/data/dir/.keep | 0 test/{ => ghcup-test}/data/file | 0 test/{ => ghcup-test}/golden/unix/GHCupInfo.json | 0 test/{ => ghcup-test}/golden/windows/GHCupInfo.json | 0 11 files changed, 4 insertions(+), 4 deletions(-) rename test/{ => ghcup-test}/GHCup/ArbitraryTypes.hs (100%) rename test/{ => ghcup-test}/GHCup/Prelude/File/Posix/TraversalsSpec.hs (93%) rename test/{ => ghcup-test}/GHCup/Types/JSONSpec.hs (83%) rename test/{ => ghcup-test}/GHCup/Utils/FileSpec.hs (100%) rename test/{ => ghcup-test}/Main.hs (100%) rename test/{ => ghcup-test}/Spec.hs (100%) rename test/{ => ghcup-test}/data/dir/.keep (100%) rename test/{ => ghcup-test}/data/file (100%) rename test/{ => ghcup-test}/golden/unix/GHCupInfo.json (100%) rename test/{ => ghcup-test}/golden/windows/GHCupInfo.json (100%) diff --git a/ghcup.cabal b/ghcup.cabal index 0ffcf8f..9f53bb7 100644 --- a/ghcup.cabal +++ b/ghcup.cabal @@ -302,7 +302,7 @@ test-suite ghcup-test type: exitcode-stdio-1.0 main-is: Main.hs build-tool-depends: hspec-discover:hspec-discover -any - hs-source-dirs: test + hs-source-dirs: test/ghcup-test other-modules: GHCup.ArbitraryTypes GHCup.Prelude.File.Posix.TraversalsSpec diff --git a/test/GHCup/ArbitraryTypes.hs b/test/ghcup-test/GHCup/ArbitraryTypes.hs similarity index 100% rename from test/GHCup/ArbitraryTypes.hs rename to test/ghcup-test/GHCup/ArbitraryTypes.hs diff --git a/test/GHCup/Prelude/File/Posix/TraversalsSpec.hs b/test/ghcup-test/GHCup/Prelude/File/Posix/TraversalsSpec.hs similarity index 93% rename from test/GHCup/Prelude/File/Posix/TraversalsSpec.hs rename to test/ghcup-test/GHCup/Prelude/File/Posix/TraversalsSpec.hs index d33c5ef..0e2023a 100644 --- a/test/GHCup/Prelude/File/Posix/TraversalsSpec.hs +++ b/test/ghcup-test/GHCup/Prelude/File/Posix/TraversalsSpec.hs @@ -24,7 +24,7 @@ spec = do -- https://github.com/haskell/ghcup-hs/issues/415 describe "GHCup.Prelude.File.Posix.Traversals" $ do it "readDirEnt" $ do - dirstream <- liftIO $ openDirStreamPortable "test/data" + dirstream <- liftIO $ openDirStreamPortable "test/ghcup-test/data" (dt1, fp1) <- readDirEntPortable dirstream (dt2, fp2) <- readDirEntPortable dirstream (dt3, fp3) <- readDirEntPortable dirstream diff --git a/test/GHCup/Types/JSONSpec.hs b/test/ghcup-test/GHCup/Types/JSONSpec.hs similarity index 83% rename from test/GHCup/Types/JSONSpec.hs rename to test/ghcup-test/GHCup/Types/JSONSpec.hs index 88fed43..852cdf9 100644 --- a/test/GHCup/Types/JSONSpec.hs +++ b/test/ghcup-test/GHCup/Types/JSONSpec.hs @@ -17,6 +17,6 @@ spec = do roundtripAndGoldenSpecsWithSettings (defaultSettings { goldenDirectoryOption = CustomDirectoryName goldenDir }) (Proxy @GHCupInfo) where goldenDir - | isWindows = "test/golden/windows" - | otherwise = "test/golden/unix" + | isWindows = "test/ghcup-test/golden/windows" + | otherwise = "test/ghcup-test/golden/unix" diff --git a/test/GHCup/Utils/FileSpec.hs b/test/ghcup-test/GHCup/Utils/FileSpec.hs similarity index 100% rename from test/GHCup/Utils/FileSpec.hs rename to test/ghcup-test/GHCup/Utils/FileSpec.hs diff --git a/test/Main.hs b/test/ghcup-test/Main.hs similarity index 100% rename from test/Main.hs rename to test/ghcup-test/Main.hs diff --git a/test/Spec.hs b/test/ghcup-test/Spec.hs similarity index 100% rename from test/Spec.hs rename to test/ghcup-test/Spec.hs diff --git a/test/data/dir/.keep b/test/ghcup-test/data/dir/.keep similarity index 100% rename from test/data/dir/.keep rename to test/ghcup-test/data/dir/.keep diff --git a/test/data/file b/test/ghcup-test/data/file similarity index 100% rename from test/data/file rename to test/ghcup-test/data/file diff --git a/test/golden/unix/GHCupInfo.json b/test/ghcup-test/golden/unix/GHCupInfo.json similarity index 100% rename from test/golden/unix/GHCupInfo.json rename to test/ghcup-test/golden/unix/GHCupInfo.json diff --git a/test/golden/windows/GHCupInfo.json b/test/ghcup-test/golden/windows/GHCupInfo.json similarity index 100% rename from test/golden/windows/GHCupInfo.json rename to test/ghcup-test/golden/windows/GHCupInfo.json