From 58ffb2e6f35ae2528d55ce92f79b42b8bc17be9c Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Mon, 13 Aug 2012 16:51:11 -0400 Subject: add adj-balance verb for incremental balance changes This is useful if you ever wanted to script balance adjustment, since it would otherwise require 2 invocations (get + set). --- runtests | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'runtests') diff --git a/runtests b/runtests index 7225d07..b2fb861 100755 --- a/runtests +++ b/runtests @@ -19,7 +19,7 @@ do_test() { (( ++testno )) - result=$("$pulsemix" "$verb" ${arg+"$arg"} 2>/dev/null) + result=$("$pulsemix" "$verb" -- ${arg+"$arg"} 2>/dev/null) if [[ $result != $expected ]]; then printf '==> test %d FAIL: expected %s, got %s\n' "$testno" "$expected" "$result" (( ++fail )) @@ -40,7 +40,11 @@ do_test '' 'decrease' bar # balance do_test 30 'set-balance' 30 +do_test 30 'get-balance' do_test 100 'set-balance' 9001 +do_test -5 'adj-balance' -105 +do_test 45 'adj-balance' 50 +do_test 100 'adj-balance' 9001 do_test 0 'set-balance' 0 if (( ! fail )); then -- cgit v1.2.3