File tree Expand file tree Collapse file tree 6 files changed +28
-2
lines changed
cabal-testsuite/PackageTests/JS/JsSources Expand file tree Collapse file tree 6 files changed +28
-2
lines changed File renamed without changes.
Original file line number Diff line number Diff line change @@ -6,7 +6,10 @@ build-type: Simple
6
6
library
7
7
default-language : Haskell2010
8
8
js-sources : jsbits/lib.js
9
- hs-source-dirs : src
9
+ if arch(JavaScript)
10
+ hs-source-dirs : srcJS
11
+ else
12
+ hs-source-dirs : src
10
13
exposed-modules : Lib
11
14
build-depends : base
12
15
Original file line number Diff line number Diff line change
1
+ # cabal v2-run
2
+ Resolving dependencies...
3
+ Build profile: -w ghc-<GHCVER> -O1
4
+ In order, the following will be built:
5
+ - jssources-0 (lib) (first run)
6
+ - jssources-0 (exe:demo) (first run)
7
+ Configuring library for jssources-0..
8
+ Preprocessing library for jssources-0..
9
+ Building library for jssources-0..
10
+ Configuring executable 'demo' for jssources-0..
11
+ Preprocessing executable 'demo' for jssources-0..
12
+ Building executable 'demo' for jssources-0..
Original file line number Diff line number Diff line change
1
+ import Test.Cabal.Prelude
2
+
3
+ main = cabalTest $ do
4
+ skipIfJavaScript
5
+ -- Ensure the field `js-sources` does not raise issues
6
+ res <- cabal' " v2-run" [" demo" ]
7
+ assertOutputContains " Hello Not JS!" res
Original file line number Diff line number Diff line change 1
1
module Lib where
2
2
3
- foreign import javascript foo :: IO ()
3
+ foo :: IO ()
4
+ foo = putStrLn " Hello Not JS!"
Original file line number Diff line number Diff line change
1
+ module Lib where
2
+
3
+ foreign import javascript foo :: IO ()
You can’t perform that action at this time.
0 commit comments