Skip to content

rtrn/shelltest-mode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Shelltest Mode

http://melpa.org/packages/shelltest-mode-badge.svg http://stable.melpa.org/packages/shelltest-mode-badge.svg

This package implements a major mode for shelltestrunner.

Besides syntax highlighting, a few useful functions for dealing with test files are provided. These functions work from all modes and can be bound to keys for additional convenience.

Installation

Either install via MELPA, or place shelltest-mode.el into your load path and do:

(require 'shelltest-mode)

To load shelltest-mode for all *.test files, add the following to your Emacs init file:

(add-to-list 'auto-mode-alist '("\\.test\\'" . shelltest-mode))

Functions

shelltest-find

Edit the test file that corresponds to the currently edited file.

The opened file is shelltest-directory/file.test, where “file” is the name of the currently edited file with its extension removed. If shelltest-other-window is non-nil, open the file in another window.

shelltest-run

Run the test file associated with the currently edited file.

The command to be run is determined by shelltest-command. Its argument is shelltest-directory/file.test, where “file” is the name of the currently edited file with its extension removed.

shelltest-run-all

Run all test files.

The command to be run is determined by shelltest-command. Its argument is shelltest-directory.

Customization

shelltest-other-window

Default: t

If given a non-nil value, shelltest-find uses another window.

shelltest-command

Default: ​"shelltest --execdir"​

The command that shelltest-run and shelltest-run-all execute.

shelltest-directory

Default: ​"./tests/"​

The directory in which the test files are located.

Note that this should end with a directory separator.

News

v1.1 (2015-02-01)

  • Require shelltest-directory to end with a directory separator.
  • Fix a bug in the syntax highlighting patterns.

v1.0 (2014-12-23)

Initial release.