Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

shell-assert

Run all tests with:

./run-tests.sh

NOTE: For the best experience, run Bash inside VS Code.

This tool provides simple test assertions for shell scripts.

Example usage:

#!/bin/bash

source ./assert/assert-equals.sh

command() {
  ./src/my-flag-parser.sh $1 $2
}

assert-equals "Flag --my-flag not found" "$(command)"
assert-equals "Flag --my-flag found" "$(command --my-flag)"
assert-equals "Flag --my-flag found" "$(command --my-flag=1)"
assert-equals "Flag --my-flag found. It's value is 'value'" "$(command --my-flag value)"
assert-equals "Flag --my-flag found. It's value is 'value'" "$(command --my-flag=valu)"

Report

ToDos

  • Fix the issue with relative paths

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages