File tree 7 files changed +40
-2
lines changed
Cabal/src/Distribution/Simple/Test
cabal-testsuite/PackageTests/TestChangeDir
7 files changed +40
-2
lines changed Original file line number Diff line number Diff line change @@ -125,13 +125,16 @@ runTest pkg_descr lbi clbi hpcMarkupInfo flags suite = do
125
125
-- drain the output.
126
126
evaluate (force logText)
127
127
128
+ let mbWorkDir = interpretSymbolicPathCWD
129
+ <$> flagToMaybe (setupWorkingDir (testCommonFlags flags))
130
+
128
131
(exit, logText) <- case testWrapper flags of
129
132
Flag path ->
130
133
rawSystemIOWithEnvAndAction
131
134
verbosity
132
135
path
133
136
(cmd : opts)
134
- Nothing
137
+ mbWorkDir
135
138
(Just shellEnv')
136
139
getLogText
137
140
-- these handles are automatically closed
@@ -143,7 +146,7 @@ runTest pkg_descr lbi clbi hpcMarkupInfo flags suite = do
143
146
verbosity
144
147
cmd
145
148
opts
146
- Nothing
149
+ mbWorkDir
147
150
(Just shellEnv')
148
151
getLogText
149
152
-- these handles are automatically closed
Original file line number Diff line number Diff line change
1
+ packages : regression-simple
Original file line number Diff line number Diff line change
1
+ import Test.Cabal.Prelude
2
+
3
+ main = cabalTest . recordMode DoNotRecord $ do
4
+ -- Building a target that contains whitespace
5
+ cabal " test" [" regression-simple" ]
Original file line number Diff line number Diff line change
1
+ # Revision history for regression-simple
2
+
3
+ ## 0.1.0.0 -- YYYY-mm-dd
4
+
5
+ * First version. Released on an unsuspecting world.
Original file line number Diff line number Diff line change
1
+ I exist
Original file line number Diff line number Diff line change
1
+ cabal-version : 3.14
2
+ name : regression-simple
3
+ version : 0.1.0.0
4
+ license : NONE
5
+ author : Matthew Pickering
6
+
7
+ build-type : Simple
8
+ extra-doc-files : CHANGELOG.md
9
+
10
+ common warnings
11
+ ghc-options : -Wall
12
+
13
+ test-suite regression-simple-test
14
+ import : warnings
15
+ default-language : Haskell2010
16
+ type : exitcode-stdio-1.0
17
+ hs-source-dirs : test
18
+ main-is : Main.hs
19
+ build-depends : base ^>= 4.20.0.0
Original file line number Diff line number Diff line change
1
+ module Main (main ) where
2
+
3
+ main :: IO ()
4
+ main = readFile " do-i-exist.txt" >>= print
You can’t perform that action at this time.
0 commit comments