mirror of
https://github.com/NorfairKing/feedback.git
synced 2024-11-22 21:19:52 +03:00
test harness skeleton
This commit is contained in:
parent
f8d05f0653
commit
8c72dda2ed
2
feedback-test-harness/.gitignore
vendored
Normal file
2
feedback-test-harness/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
.stack-work/
|
||||
*~
|
15
feedback-test-harness/default.nix
Normal file
15
feedback-test-harness/default.nix
Normal file
@ -0,0 +1,15 @@
|
||||
{ mkDerivation, base, feedback, lib, path, path-io, sydtest
|
||||
, sydtest-discover, typed-process
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "feedback-test-harness";
|
||||
version = "0.0.0.0";
|
||||
src = ./.;
|
||||
libraryHaskellDepends = [ base feedback path path-io ];
|
||||
testHaskellDepends = [ base feedback sydtest typed-process ];
|
||||
testToolDepends = [ sydtest-discover ];
|
||||
doHaddock = false;
|
||||
homepage = "https://github.com/NorfairKing/feedback#readme";
|
||||
description = "Tests for 'feedback'";
|
||||
license = lib.licenses.gpl3Only;
|
||||
}
|
55
feedback-test-harness/feedback-test-harness.cabal
Normal file
55
feedback-test-harness/feedback-test-harness.cabal
Normal file
@ -0,0 +1,55 @@
|
||||
cabal-version: 2.2
|
||||
|
||||
-- This file has been generated from package.yaml by hpack version 0.34.7.
|
||||
--
|
||||
-- see: https://github.com/sol/hpack
|
||||
|
||||
name: feedback-test-harness
|
||||
version: 0.0.0.0
|
||||
synopsis: Tests for 'feedback'
|
||||
homepage: https://github.com/NorfairKing/feedback#readme
|
||||
bug-reports: https://github.com/NorfairKing/feedback/issues
|
||||
author: Tom Sydney Kerckhove
|
||||
maintainer: syd@cs-syd.eu
|
||||
copyright: Copyright (c) 2022-2023 Tom Sydney Kerckhove
|
||||
license: GPL-3.0-only
|
||||
build-type: Simple
|
||||
|
||||
source-repository head
|
||||
type: git
|
||||
location: https://github.com/NorfairKing/feedback
|
||||
|
||||
library
|
||||
other-modules:
|
||||
Paths_feedback_test_harness
|
||||
autogen-modules:
|
||||
Paths_feedback_test_harness
|
||||
hs-source-dirs:
|
||||
src
|
||||
build-depends:
|
||||
base >=4.7 && <5
|
||||
, feedback
|
||||
, path
|
||||
, path-io
|
||||
default-language: Haskell2010
|
||||
|
||||
test-suite feedback-test
|
||||
type: exitcode-stdio-1.0
|
||||
main-is: Spec.hs
|
||||
other-modules:
|
||||
FeedbackSpec
|
||||
Paths_feedback_test_harness
|
||||
autogen-modules:
|
||||
Paths_feedback_test_harness
|
||||
hs-source-dirs:
|
||||
test/
|
||||
ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall
|
||||
build-tool-depends:
|
||||
sydtest-discover:sydtest-discover
|
||||
build-depends:
|
||||
base >=4.7 && <5
|
||||
, feedback
|
||||
, feedback-test-harness
|
||||
, sydtest
|
||||
, typed-process
|
||||
default-language: Haskell2010
|
34
feedback-test-harness/package.yaml
Normal file
34
feedback-test-harness/package.yaml
Normal file
@ -0,0 +1,34 @@
|
||||
name: feedback-test-harness
|
||||
version: 0.0.0.0
|
||||
github: "NorfairKing/feedback"
|
||||
license: GPL-3.0-only
|
||||
author: "Tom Sydney Kerckhove"
|
||||
maintainer: "syd@cs-syd.eu"
|
||||
copyright: "Copyright (c) 2022-2023 Tom Sydney Kerckhove"
|
||||
synopsis: Tests for 'feedback'
|
||||
|
||||
dependencies:
|
||||
- base >= 4.7 && < 5
|
||||
|
||||
library:
|
||||
source-dirs: src
|
||||
dependencies:
|
||||
- feedback
|
||||
- path
|
||||
- path-io
|
||||
|
||||
tests:
|
||||
feedback-test:
|
||||
main: Spec.hs
|
||||
source-dirs: test/
|
||||
build-tools: sydtest-discover
|
||||
ghc-options:
|
||||
- -threaded
|
||||
- -rtsopts
|
||||
- -with-rtsopts=-N
|
||||
- -Wall
|
||||
dependencies:
|
||||
- feedback
|
||||
- feedback-test-harness
|
||||
- sydtest
|
||||
- typed-process
|
11
feedback-test-harness/test/FeedbackSpec.hs
Normal file
11
feedback-test-harness/test/FeedbackSpec.hs
Normal file
@ -0,0 +1,11 @@
|
||||
module FeedbackSpec (spec) where
|
||||
|
||||
import System.Process.Typed
|
||||
import Test.Syd
|
||||
|
||||
spec :: Spec
|
||||
spec = sequential $ do
|
||||
it "can show help text" $ do
|
||||
let cp = setStdout nullStream $ proc "feedback" ["--help"]
|
||||
runProcess_ cp :: IO ()
|
||||
pure ()
|
1
feedback-test-harness/test/Spec.hs
Normal file
1
feedback-test-harness/test/Spec.hs
Normal file
@ -0,0 +1 @@
|
||||
{-# OPTIONS_GHC -F -pgmF sydtest-discover #-}
|
@ -63,7 +63,7 @@
|
||||
};
|
||||
devShells.${system}.default = pkgs.haskellPackages.shellFor {
|
||||
name = "feedback-shell";
|
||||
packages = p: [ p.feedback ];
|
||||
packages = p: [ p.feedback p.feedback-test-harness ];
|
||||
withHoogle = true;
|
||||
doBenchmark = true;
|
||||
buildInputs = (with pkgs; [
|
||||
|
@ -15,6 +15,7 @@ with final.haskell.lib;
|
||||
overrides = composeExtensions (old.overrides or (_: _: { })) (
|
||||
self: super:
|
||||
{
|
||||
feedback-test-harness = addBuildDepend (self.callPackage ../feedback-test-harness { }) final.feedback;
|
||||
feedback = generateOptparseApplicativeCompletion "feedback" (
|
||||
buildFromSdist (overrideCabal
|
||||
(
|
||||
|
Loading…
Reference in New Issue
Block a user