summaryrefslogtreecommitdiff
path: root/test/problem-6.bats
diff options
context:
space:
mode:
Diffstat (limited to 'test/problem-6.bats')
-rw-r--r--test/problem-6.bats16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/problem-6.bats b/test/problem-6.bats
index 77d64f5..6340545 100644
--- a/test/problem-6.bats
+++ b/test/problem-6.bats
@@ -1,6 +1,22 @@
#!/usr/bin/env bats
+load test_helper
+
@test "testing" {
result="$(echo 2+2 | bc)"
[ "$result" -eq 4 ]
}
+
+@test "invoke with a single integer" {
+ run problem-6.sh 2
+
+ assert_success
+ #assert_equal "squares: 4\nsum: 2\n", $output
+}
+
+@test "invoke with multiple integers" {
+ run problem-6.sh 1 2 3 4 5 6 7 8 9 10
+
+ assert_success
+ #assert_equal "squares: 1 4 9 16 25 36 49 64 81 100\nsum: 55\n", $output
+}