Coder Social home page Coder Social logo

sensei's Introduction

THIS IS EXPERIMENTAL STUFF! USE AT YOUR OWN RISK!

先生 (rōmaji: sensei)

(sensei is Japanese for 'teacher'.)

In it's simplest form, you run sensei with the Main module of your test suite as an argument:

sensei test/Spec.hs

Note that sensei picks up options from .ghci-files. You can provide additional GHC options on the command line:

sensei -isrc -itest test/Spec.hs

Command-line arguments that look like Hspec options are passed to Hspec. To avoid ambiguity, GHC options have to be given before any Hspec options:

sensei -isrc -itest test/Spec.hs --no-color --match foo

All command-line arguments after the last -- are passed to Hspec, regardless how they look:

sensei -isrc -itest test/Spec.hs -- --no-color --match foo

Using sensei with Cabal sandboxes

cabal exec sensei test/Spec.hs

生徒 (rōmaji: seito): Accessing result on the command-line

(seito is Japanese for 'student'.)

You can access the results of the last test run with seito:

seito

Alternatively, if you have curl version 7.40.0 or newer, you can use curl instead:

curl --unix-socket .sensei.sock http://localhost/

Vim integration

You can use sensei to load the result of the last test run into your quickfix list by executing :make in Vim.

For this to work you can either create a Makefile or set makeprg to a custom value.

(In both cases sed is used to strip ANSI color sequences.)

Option 1: Create a Makefile

Create a Makefile with the following content:

all:
	@seito | sed 's/\x1B\[[0-9;]*[JKmsu]//g'

Option 2: Set makeprg:

Add the following to your Vim configuration (e.g. ~/.vim/after/ftplugin/haskell.vim):

:set makeprg=seito\ \\\|\ sed\ 's/\\x1B\\[[0-9;]*[JKmsu]//g'

sensei's People

Contributors

sol avatar fisx avatar qoelet avatar robbinch avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.