#!/usr/bin/env bats @test "1+1 should equal to 2" { [ "$((1+1))" -eq 2 ] } @test "When test.sh is passed 'hoge', it should output 'hoge'" { run ./test.sh "hoge" [ $status -eq 0 ] [[ $output =~ hoge ]] } @test "When test.sh doesn't have arguments, it should show usage" { run ./test.sh [ $status -eq 1 ] local usage="usage: test.sh <message>" [[ $output =~ $usage ]] } @test "Whey say function is pass
{{#tags}}- {{label}}
{{/tags}}