Skip to content

Commit

Permalink
Add failing tests to prove error
Browse files Browse the repository at this point in the history
  • Loading branch information
dnnrly committed Jan 12, 2020
1 parent 6f560d6 commit 55d8e91
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/basic.bats
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,21 @@ BIN=./httpref
[ $status -eq 0 ]
}

@test "Finds unique entry on exact match on root" {
run ${BIN} Accept
[ $status -eq 0 ]
[ "$(echo $output | grep -c '/docs/Web/HTTP/Headers/Accept$')" -eq 1 ]
}

@test "Wildcard matching works on root" {
run ${BIN} Accept\*
[ $status -eq 0 ]
[ "$(echo $output | grep -c '/docs/Web/HTTP/Headers/Accept$')" -gt 1 ]
}

@test "Finds unique entry on exact match on headers" {
run ${BIN} headers Accept
[ $status -eq 0 ]
[ "$(echo $output | grep -c '/docs/Web/HTTP/Headers/Accept$')" -eq 1 ]
}

0 comments on commit 55d8e91

Please sign in to comment.