Coder Social home page Coder Social logo

run-test's Introduction

# -*- rd -*-

= README.en

$Id$

== Name

run-test.el

== Author

Kouhei Sutou <[email protected]>

== License

GPLv3 or later

== What's this?

An Emacs-Lisp which suports running tests.

== Get

  % git clone https://github.com/kou/run-test.git

== Install

  % sudo ./install.sh

== Uninstall

  % sudo ./uninstall.sh

== Usage

lib/run-test.el is Emacs-Lisp for support running test in
Emacs. lib/run-test-setting.el is Emacs-Lisp for setting
run-test.el

Write following code in your .emacs.

  (setq load-path (cons directory-which-has-run-test{,-setting}.el load-path))
  (load "run-test-setting")

We assume that we want to run tests written by
((<GaUnit|URL:http://www.cozmixng.org/~rwiki/?cmd=view;name=GaUnit>)).

Write run-test.scm which run test like the below:

  #!/usr/bin/env gosh

  (add-load-path ".")

  (use test.unit)

  (define base-dir (sys-dirname *program-name*))
  (for-each load (glob #`",|base-dir|/**/test-*.scm"))


Make a directory whose name is `test' and move run-test.scm to
the directory. Don't forget add execution authority to
run-test.scm.

Make some test files whose name is started in `test-' in the
`test' directry. The organization of directory is following.

  topdir --- test --- run-test.scm
                   |
                   +- test-hoge.scm
                   |
                   .
                   .
                   .
                   |
                   +- test-fuga.scm

A test (run-test.scm) is invoked in `topdir'. That is test
is invoked following.

  % test/run-test.scm

Don't forget it when you write run-test.scm.

Setup is finished.

You can run test (topdir/test/run-test.scm) by C-cC-t
(run-test) when you are in under `topdir' and jump to error
assertion by C-x`.

You can run test by C-cT(run-test-in-new-frame), too. It
runs test in new frame. I advice you it is good when you run
test at the first.

Happy testing!!

== Key bindings

: C-cC-t
   Runs test.

: C-cT
   Runs test. A test result is showed in a new frame.

== Customize variables

: run-test-file-names
   Is is a list of base name of file that runs test.
   
   default: ("test/run-test" "test/runner" "run-test")

: run-test-suffixes
   It is a list of suffix that is added to
   ((|run-test-file|)).
   
   default: ("" ".scm" ".rb" ".py" ".sh")

== Thanks

  * Nobuyoshi Nakada:
    * sent patches.

run-test's People

Contributors

kou avatar

Watchers

 avatar  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.