summaryrefslogtreecommitdiff
path: root/test/problem-6.bats
blob: 6340545ed5906089b5f04bcac6556fd4e57c1e13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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
}