An open API service indexing awesome lists of open source software.

https://github.com/mannikim/test.sh

shell script for testing programs
https://github.com/mannikim/test.sh

c c99 gplv3 minimal shell shell-script testing-tools

Last synced: 2 months ago
JSON representation

shell script for testing programs

Awesome Lists containing this project

README

          

# test.sh

`test.sh` is a shell script for running full-program tests on a specified
program

## features

- tests programs
- using shell

## usage

### running tests

```sh
$ test.sh [-s|-v]
```

### writing tests

first, create a directory for your tests

```sh
$ mkdir tests
```

inside this directory, create a shell script

this shell script is the test for the program. the script should return 0 when
the test is passed

use `$1` for the current program being tested

## examples

this repository contains a simple example program, `pow`, which you can compile
using the provided makefile. you can run tests on it by running `make test` or
running `./test.sh pow tests/pow`

## license and copyright

licensed under the GNU GPLv3.0 or any later version, at your option. see
LICENSE file for license and copyright information