commit 173d7dce198d7990ee7d4dac1c360e949d8acb4a
parent b116996f5c6d1dbebad94e5796dc5c4e1d396116
Author: William Casarin <jb55@jb55.com>
Date: Tue, 19 Dec 2017 14:55:10 -0800
tests: header for test file
Diffstat:
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/test/run b/test/run
@@ -6,6 +6,7 @@ fail=0
printf "1..%d\n" "$c"
+tail -n+2 tests.csv | \
while IFS=, read -r description args input expected
do
output=$(../bcalc $args <<<"$input" 2>&1)
@@ -17,6 +18,6 @@ do
printf "ok %d - %s\n" "$n" "$description"
fi
n=$((n + 1))
-done < tests.csv
+done
exit $fail
diff --git a/test/tests.csv b/test/tests.csv
@@ -1,3 +1,4 @@
+description,args,input,expected output
scalar division,--btc -p,1 BTC / 10,0.1 BTC
scalar multiplication,--btc,10 * 1 BTC,10
multiply 1 BTC to the smallest unit,-pm,1 BTC * 0.00000000001,1 msat