From 1c23ff894b1413b774f3d805785fd1fdc88ecd09 Mon Sep 17 00:00:00 2001 From: mo Date: Sat, 25 May 2019 18:51:39 -0600 Subject: validate input --- test/problem-6.bats | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test') diff --git a/test/problem-6.bats b/test/problem-6.bats index 9246bca..0c37092 100644 --- a/test/problem-6.bats +++ b/test/problem-6.bats @@ -18,3 +18,9 @@ load test_helper assert_success $'squares: 1 4 9 16 25 36 49 64 81 100\nsum: 55' } + +@test "invoke with single non-numeric" { + run problem-6.sh "oops" + + assert_failure $'error: "oops" is not a number' +} -- cgit v1.2.3