Added method of getting function names.

This commit is contained in:
Dylan Araps
2018-06-18 09:25:38 +10:00
parent 5f61ee3885
commit aa490304ef
2 changed files with 15 additions and 1 deletions

View File

@@ -139,6 +139,11 @@ test_bar() {
assert_equals "${result//$'\r'}" "[----- ]"
}
test_get_functions() {
IFS=$'\n' read -d "" -ra functions < <(get_functions)
assert_equals "${functions[0]}" "assert_equals"
}
assert_equals() {
if [[ "$1" == "$2" ]]; then
((pass+=1))