summaryrefslogtreecommitdiff
path: root/test/example.bats
blob: 5acd1add998ee577beb3a92b4ee80ad0be0f4a8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env bats

load test_helper

@test "testing" {
  result="$(echo 2+2 | bc)"
  [ "$result" -eq 4 ]
}

@test "is successfull" {
  run echo 'hello'

  assert_success $'hello'
}

@test "produces an error" {
  run rm blah

  assert_failure $'rm: blah: No such file or directory'
}