-
Notifications
You must be signed in to change notification settings - Fork 845
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
12 changed files
with
131 additions
and
3 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import Control.Concurrent | ||
import StackTest | ||
|
||
main :: IO () | ||
main = do | ||
copy "src/Unlisted_OK.hs" "src/Unlisted.hs" | ||
copy "embed_OK.txt" "embed.txt" | ||
stack ["build"] | ||
pause | ||
copy "src/Unlisted_FAIL.hs" "src/Unlisted.hs" | ||
stackErr ["build"] | ||
pause | ||
copy "src/Unlisted_OK.hs" "src/Unlisted.hs" | ||
stack ["build"] | ||
stack ["exec", "files-exe"] | ||
pause | ||
copy "embed_FAIL.txt" "embed.txt" | ||
stack ["build"] | ||
stackErr ["exec", "files-exe"] | ||
pause | ||
copy "embed_OK.txt" "embed.txt" | ||
stack ["build"] | ||
stack ["exec", "files-exe"] | ||
|
||
pause = threadDelay 1000000 |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
FAIL |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
OK |
16 changes: 16 additions & 0 deletions
16
test/integration/tests/32-unlisted-module/files/files.cabal
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: files | ||
version: 0.1.0.0 | ||
synopsis: Initial project template from stack | ||
description: Please see README.md | ||
homepage: http://github.com/githubuser/files#readme | ||
license: BSD3 | ||
build-type: Simple | ||
-- extra-source-files: | ||
cabal-version: >=1.10 | ||
|
||
executable files-exe | ||
hs-source-dirs: src/../src | ||
main-is: Main.hs | ||
build-depends: base >= 4.7 && < 5 | ||
, file-embed | ||
default-language: Haskell2010 |
15 changes: 15 additions & 0 deletions
15
test/integration/tests/32-unlisted-module/files/src/Main.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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{-# LANGUAGE TemplateHaskell #-} | ||
{-# LANGUAGE OverloadedStrings #-} | ||
module Main where | ||
|
||
import Data.FileEmbed | ||
import Unlisted | ||
|
||
main :: IO () | ||
main = do | ||
putStrLn ("main " ++ show foo ++ " " ++ show embedded) | ||
if embedded == "FAIL\n" | ||
then error "embedded contains FAIL" | ||
else return () | ||
|
||
embedded = $(embedFile "embed.txt") |
5 changes: 5 additions & 0 deletions
5
test/integration/tests/32-unlisted-module/files/src/Unlisted_FAIL.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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
-- | Version of Unlisted with different export that causes failure to compile. | ||
module Unlisted where | ||
|
||
fooRenamed :: String | ||
fooRenamed = "foo" |
4 changes: 4 additions & 0 deletions
4
test/integration/tests/32-unlisted-module/files/src/Unlisted_OK.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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module Unlisted where | ||
|
||
foo :: String | ||
foo = "foo" |
3 changes: 3 additions & 0 deletions
3
test/integration/tests/32-unlisted-module/files/src/main/Main.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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module Main where | ||
|
||
main = do putStrLn "Hello, world." |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
flags: {} | ||
packages: | ||
- '.' | ||
extra-deps: [] | ||
resolver: lts-3.0 |