File tree 4 files changed +54
-0
lines changed
cabal-testsuite/PackageTests/Install/T7297-8909-7236
repo/external-lib-0.1.0.0 4 files changed +54
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,9 @@ main = cabalTest $ do
11
11
runInstalledExe' " my-exe" []
12
12
>>= assertOutputContains (" hi" ++ show v)
13
13
14
+ installExternalWithTgt tgt v = withRepo " repo" (installWithTgt tgt v)
15
+
16
+
14
17
cabal " install" (commonOpts 1 ) -- no target
15
18
runInstalledExe' " my-exe" []
16
19
>>= assertOutputContains " hi1"
@@ -20,3 +23,6 @@ main = cabalTest $ do
20
23
installWithTgt " my-exe" 4
21
24
installWithTgt " all" 5
22
25
installWithTgt " all:exes" 6
26
+
27
+ -- And test it works when installing from an external repo (think Hackage)
28
+ installExternalWithTgt " external-lib" 2
Original file line number Diff line number Diff line change
1
+ # Revision history for external-lib0100
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
+ {-# LANGUAGE CPP #-}
2
+
3
+ #ifdef TEST1
4
+ main = putStrLn " hi1"
5
+ #endif
6
+
7
+ #ifdef TEST2
8
+ main = putStrLn " hi2"
9
+ #endif
10
+
11
+ #ifdef TEST3
12
+ main = putStrLn " hi3"
13
+ #endif
14
+
15
+ #ifdef TEST4
16
+ main = putStrLn " hi4"
17
+ #endif
18
+
19
+ #ifdef TEST5
20
+ main = putStrLn " hi5"
21
+ #endif
22
+
23
+ #ifdef TEST6
24
+ main = putStrLn " hi6"
25
+ #endif
Original file line number Diff line number Diff line change
1
+ cabal-version : 3.0
2
+ name : external-lib
3
+ version : 0.1.0.0
4
+ license : NONE
5
+
6
+ maintainer : Matthew Pickering
7
+ build-type : Simple
8
+ extra-doc-files : CHANGELOG.md
9
+
10
+ common warnings
11
+ ghc-options : -Wall
12
+
13
+ executable my-exe
14
+ import : warnings
15
+ main-is : Main.hs
16
+ build-depends : base
17
+ hs-source-dirs : .
18
+ default-language : Haskell2010
You can’t perform that action at this time.
0 commit comments