tasty-program: Use tasty framework to test whether a program executes correctly

[ bsd3, library, testing ] [ Propose Tags ] [ Report a vulnerability ]

This package provides a function that extends tasty testing framework with capability to test whether an external program runs successfully. This package is inspired by test-framework-program package by Adam Wick. tasty-program provides basic functionality of running a program with specified set of command line parameters, and optionally a working directory, and checking the exit code. Program's output and error streams are ignored.


[Skip to Readme]

Modules

[Index]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.5, 1.1.0
Dependencies base (>=4.6 && <4.8), directory, filepath, process, tasty (>=0.8) [details]
Tested with ghc >=7.6.3
License BSD-3-Clause
Copyright Jan Stolarek, 2014
Author Jan Stolarek
Maintainer jan.stolarek@p.lodz.pl
Category Testing
Home page https://github.com/jstolarek/tasty-program
Bug tracker https://github.com/jstolarek/tasty-program/issues
Source repo head: git clone git://github.com/jstolarek/tasty-program.git
Uploaded by JanStolarek at 2014-04-01T10:16:58Z
Distributions LTSHaskell:1.1.0, NixOS:1.1.0, Stackage:1.1.0
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 4710 total (30 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Successful builds reported [all 1 reports]

Readme for tasty-program-1.0.1

[back to package description]

tasty-program

This package provides a function that extends tasty testing framework with capability to test whether an external program runs successfully. This package is inspired by test-framework-program package by Adam Wick.

tasty-program provides basic functionality of running a program with specified set of command line parameters, and optionally a working directory, and checking the exit code. Program's output and error streams are ignored.

You can download latest stable release from Hackage

Example

Given foo.hs source file:

module Foo where

foo :: Int
foo = 5

you can test whether GHC can compile it:

module Main (
  main
 ) where

import Test.Tasty
import Test.Tasty.Program

main :: IO ()
main = defaultMain $ testGroup "Compilation with GHC" $ [
    testProgram "Foo" "ghc" ["-fforce-recomp", "foo.hs"] Nothing
  ]