Skip to content
Snippets Groups Projects
Commit ec81f295 authored by Edward Z. Yang's avatar Edward Z. Yang Committed by Mikhail Glushenkov
Browse files

Failing test-case for sandbox add-source regression.


Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
parent b8aac069
No related branches found
No related tags found
No related merge requests found
......@@ -26,6 +26,7 @@ import Test.Framework (Test, defaultMain, testGroup)
-- Modules containing the tests.
import qualified PackageTests.Exec.Check
import qualified PackageTests.Freeze.Check
import qualified PackageTests.MultipleSource.Check
-- List of tests to run. Each test will be called with the path to the
-- cabal binary to use.
......@@ -33,6 +34,7 @@ tests :: FilePath -> FilePath -> [Test]
tests cabalPath ghcPkgPath =
[ testGroup "Freeze" $ PackageTests.Freeze.Check.tests cabalPath
, testGroup "Exec" $ PackageTests.Exec.Check.tests cabalPath ghcPkgPath
, testGroup "MultipleSource" $ PackageTests.MultipleSource.Check.tests cabalPath
]
cabalProgram :: Program
......
module PackageTests.MultipleSource.Check
( tests
) where
import PackageTests.PackageTester
import Test.Framework as TF (Test)
import Test.Framework.Providers.HUnit (testCase)
import System.FilePath ((</>))
dir :: FilePath
dir = "PackageTests" </> "MultipleSource"
tests :: FilePath -> [TF.Test]
tests cabalPath =
[ testCase "finds second source of multiple source" $ do
-- can fail if there is no pre-existing sandbox
_ <- cabal_sandbox dir ["delete"] cabalPath
assertSandboxSucceeded =<< cabal_sandbox dir ["init"] cabalPath
assertSandboxSucceeded =<< cabal_sandbox dir ["add-source", "p"] cabalPath
assertSandboxSucceeded =<< cabal_sandbox dir ["add-source", "q"] cabalPath
assertInstallSucceeded =<< cabal_install dir ["q"] cabalPath
]
import Distribution.Simple
main = defaultMain
name: p
version: 0.1.0.0
license-file: LICENSE
author: Edward Z. Yang
maintainer: ezyang@cs.stanford.edu
build-type: Simple
cabal-version: >=1.10
library
build-depends: base
default-language: Haskell2010
import Distribution.Simple
main = defaultMain
name: q
version: 0.1.0.0
license-file: LICENSE
author: Edward Z. Yang
maintainer: ezyang@cs.stanford.edu
build-type: Simple
cabal-version: >=1.10
library
build-depends: base
default-language: Haskell2010
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment