Skip to content

A test runner for POSIX-compliant shells

License

Notifications You must be signed in to change notification settings

bash-bastion/shelltest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

shelltest

A test runner for POSIX shells

Features

  • POSIX compliant
  • No eval
  • Uses only builtins
  • Perform tests with [, etc.
  • TAPS output
  • setup, setup_file, teardown, teardown_file
  • Utility functions t_is_function, t_get_shell_version, t_assert

Tested on

  • sh
  • BusyBox sh
  • ash
  • dash (Debian variant of NetBSD ash)
  • yash
  • oil
  • nsh
  • bash
  • zsh
  • ksh (2020.0.0)
  • pdksh
  • mksh (MirBSD fork of OpenBSD pdksh)
  • loksh (Linux port of OpenBSD pdksh)
  • oksh (General port of OpenBSD pdksh)

More rigorous test suite coming soon...

Installation

Use Basalt, a Bash package manager, to install this project globally

basalt global add hyperupcall/shelltest

Usage

shelltest ./tests