lehmannro / assert.sh

bash unit testing framework
GNU Lesser General Public License v3.0
487 stars 57 forks source link

Tests are run even if `bc` is not installed #8

Closed bfontaine closed 9 years ago

bfontaine commented 10 years ago

Here is my test file for mvb:

#! /bin/bash

. assert.sh

# `mvb a b` should fail if 'b' doesn't exist
assert_raises 'mvb a b' 1

# `mvb a b` should rename 'b' to 'a'
touch b
assert_raises 'mvb a b' 0
assert_raises '[ -f a ]' 0
rm a

# `mvb a b/` should mv 'b/a' in 'a'
mkdir b
touch b/a
assert_raises 'mvb a b/' 0
assert_raises '[ -f a ]' 0
rm a
rmdir b

assert_end 'mvb'

I tested on Travis and bc is not installed by default, here is the (end of the) log:

$ cd tests;bash ./tests.sh
assert.sh: line 81: bc: command not found
all 5 mvb tests passed in s.

The command "bash ./tests.sh" exited with 0.

Done. Your build exited with 0.
b-long commented 9 years ago

This is probably safe to mark as a non-issue since https://github.com/lehmannro/assert.sh/pull/7 was merged.

lehmannro commented 9 years ago

Yup, should no longer be an issue in v1.1.