Use test-runner.sh instead of homegrown test.sh

This commit is contained in:
2014-05-26 13:44:08 +01:00
parent 47ce28bba6
commit f3e0f666cb
21 changed files with 35 additions and 42 deletions

21
test/__stub_call.test.sh Executable file
View File

@@ -0,0 +1,21 @@
#! /usr/bin/env bash
source "test-helper.sh"
#
# __stub_call() tests.
#
# Adds call to stub call list.
STUB_INDEX=("uname=0")
STUB_0_CALLS=()
__stub_call "uname"
__stub_call "uname" -r
__stub_call "uname" -r -a
assert 'echo ${STUB_0_CALLS[@]}' "<none> -r -r -a"
assert 'echo ${STUB_0_CALLS[0]}' "<none>"
assert 'echo ${STUB_0_CALLS[1]}' "-r"
assert 'echo ${STUB_0_CALLS[2]}' "-r -a"
# End of tests.
assert_end "__stub_call()"