-
Notifications
You must be signed in to change notification settings - Fork 701
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reenable script tests for Windows/ghc-9.4.*
- Loading branch information
1 parent
8df083c
commit 79e804b
Showing
12 changed files
with
53 additions
and
89 deletions.
There are no files selected for viewing
13 changes: 5 additions & 8 deletions
13
cabal-testsuite/PackageTests/NewBuild/CmdBuild/Script/cabal.test.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,10 @@ | ||
import Test.Cabal.Prelude | ||
|
||
main = cabalTest . void $ do | ||
isWin <- isWindows | ||
ghc94 <- isGhcVersion "== 9.4.*" | ||
expectBrokenIf (isWin && ghc94) 8451 $ do | ||
cabal' "v2-build" ["script.hs"] | ||
cabal' "v2-build" ["script.hs"] | ||
|
||
env <- getTestEnv | ||
cacheDir <- getScriptCacheDirectory $ testCurrentDir env </> "script.hs" | ||
env <- getTestEnv | ||
cacheDir <- getScriptCacheDirectory $ testCurrentDir env </> "script.hs" | ||
|
||
shouldExist $ cacheDir </> "fake-package.cabal" | ||
shouldExist $ cacheDir </> "scriptlocation" | ||
shouldExist $ cacheDir </> "fake-package.cabal" | ||
shouldExist $ cacheDir </> "scriptlocation" |
7 changes: 2 additions & 5 deletions
7
cabal-testsuite/PackageTests/NewBuild/CmdBuild/ScriptBuildRepl/cabal.test.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
import Test.Cabal.Prelude | ||
|
||
main = cabalTest . void $ do | ||
isWin <- isWindows | ||
ghc94 <- isGhcVersion "== 9.4.*" | ||
expectBrokenIf (isWin && ghc94) 8451 $ do | ||
cabal' "v2-build" ["script.hs"] | ||
cabalWithStdin "v2-repl" ["script.hs"] "" | ||
cabal' "v2-build" ["script.hs"] | ||
cabalWithStdin "v2-repl" ["script.hs"] "" |
7 changes: 2 additions & 5 deletions
7
cabal-testsuite/PackageTests/NewBuild/CmdBuild/ScriptBuildRun/cabal.test.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
import Test.Cabal.Prelude | ||
|
||
main = cabalTest . void $ do | ||
isWin <- isWindows | ||
ghc94 <- isGhcVersion "== 9.4.*" | ||
expectBrokenIf (isWin && ghc94) 8451 $ do | ||
cabal' "v2-build" ["script.hs"] | ||
cabal' "v2-run" ["script.hs"] | ||
cabal' "v2-build" ["script.hs"] | ||
cabal' "v2-run" ["script.hs"] |
7 changes: 2 additions & 5 deletions
7
cabal-testsuite/PackageTests/NewBuild/CmdBuild/ScriptRerun/cabal.test.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
import Test.Cabal.Prelude | ||
|
||
main = cabalTest . void $ do | ||
isWin <- isWindows | ||
ghc94 <- isGhcVersion "== 9.4.*" | ||
expectBrokenIf (isWin && ghc94) 8451 $ do | ||
cabal' "v2-build" ["script.hs"] | ||
cabal' "v2-build" ["script.hs"] | ||
cabal' "v2-build" ["script.hs"] | ||
cabal' "v2-build" ["script.hs"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 6 additions & 9 deletions
15
cabal-testsuite/PackageTests/NewBuild/CmdClean/Script/cabal.test.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
import Test.Cabal.Prelude | ||
|
||
main = cabalTest . void $ do | ||
isWin <- isWindows | ||
ghc94 <- isGhcVersion "== 9.4.*" | ||
expectBrokenIf (isWin && ghc94) 8451 $ do | ||
cabal' "v2-build" ["script.hs"] | ||
cabal' "v2-clean" ["script.hs"] | ||
cabal' "v2-build" ["script.hs"] | ||
cabal' "v2-clean" ["script.hs"] | ||
|
||
env <- getTestEnv | ||
cacheDir <- getScriptCacheDirectory (testCurrentDir env </> "script.hs") | ||
env <- getTestEnv | ||
cacheDir <- getScriptCacheDirectory (testCurrentDir env </> "script.hs") | ||
|
||
shouldDirectoryNotExist cacheDir | ||
shouldDirectoryNotExist (testDistDir env) | ||
shouldDirectoryNotExist cacheDir | ||
shouldDirectoryNotExist (testDistDir env) |
15 changes: 6 additions & 9 deletions
15
cabal-testsuite/PackageTests/NewBuild/CmdRun/Script/cabal.test.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
import Test.Cabal.Prelude | ||
|
||
main = cabalTest $ do | ||
isWin <- isWindows | ||
ghc94 <- isGhcVersion "== 9.4.*" | ||
expectBrokenIf (isWin && ghc94) 8451 $ do | ||
res <- cabal' "v2-run" ["script.hs"] | ||
assertOutputContains "Hello World" res | ||
res <- cabal' "v2-run" ["script.hs"] | ||
assertOutputContains "Hello World" res | ||
|
||
env <- getTestEnv | ||
cacheDir <- getScriptCacheDirectory (testCurrentDir env </> "script.hs") | ||
env <- getTestEnv | ||
cacheDir <- getScriptCacheDirectory (testCurrentDir env </> "script.hs") | ||
|
||
shouldExist $ cacheDir </> "fake-package.cabal" | ||
shouldExist $ cacheDir </> "scriptlocation" | ||
shouldExist $ cacheDir </> "fake-package.cabal" | ||
shouldExist $ cacheDir </> "scriptlocation" |
7 changes: 2 additions & 5 deletions
7
cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptLiterate/cabal.test.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
import Test.Cabal.Prelude | ||
|
||
main = cabalTest $ do | ||
isWin <- isWindows | ||
ghc94 <- isGhcVersion "== 9.4.*" | ||
expectBrokenIf (isWin && ghc94) 8451 $ do | ||
res <- cabal' "v2-run" ["script.lhs"] | ||
assertOutputContains "Hello World" res | ||
res <- cabal' "v2-run" ["script.lhs"] | ||
assertOutputContains "Hello World" res |
5 changes: 1 addition & 4 deletions
5
cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptNoExtension/cabal.test.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
import Test.Cabal.Prelude | ||
|
||
main = cabalTest . void $ do | ||
isWin <- isWindows | ||
ghc94 <- isGhcVersion "== 9.4.*" | ||
expectBrokenIf (isWin && ghc94) 8451 $ do | ||
cabal' "v2-run" ["with sp"] >>= assertOutputContains "Hello World" | ||
cabal' "v2-run" ["with sp"] >>= assertOutputContains "Hello World" |
7 changes: 2 additions & 5 deletions
7
cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptRerun/cabal.test.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
import Test.Cabal.Prelude | ||
|
||
main = cabalTest . void $ do | ||
isWin <- isWindows | ||
ghc94 <- isGhcVersion "== 9.4.*" | ||
expectBrokenIf (isWin && ghc94) 8451 $ do | ||
cabal' "v2-run" ["script.hs"] | ||
cabal' "v2-run" ["script.hs"] | ||
cabal' "v2-run" ["script.hs"] | ||
cabal' "v2-run" ["script.hs"] |
9 changes: 3 additions & 6 deletions
9
cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptWithProjectBlock/cabal.test.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
import Test.Cabal.Prelude | ||
|
||
main = cabalTest $ do | ||
isWin <- isWindows | ||
ghc94 <- isGhcVersion "== 9.4.*" | ||
expectBrokenIf (isWin && ghc94) 8451 $ do | ||
-- script is called "s.hs" to avoid Windows long path issue in CI | ||
res <- cabal' "v2-run" ["s.hs"] | ||
assertOutputContains "Hello World" res | ||
-- script is called "s.hs" to avoid Windows long path issue in CI | ||
res <- cabal' "v2-run" ["s.hs"] | ||
assertOutputContains "Hello World" res |