Skip to content

Commit

Permalink
add test for no argument given
Browse files Browse the repository at this point in the history
  • Loading branch information
arl committed Jun 2, 2015
1 parent bb408ec commit d750815
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/tests.bats
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,17 @@ load test_helper
assert_equal "${lines[5]}" " gh-md-toc --version Show help"
}

@test "no arguments" {
run $BATS_TEST_DIRNAME/../gh-md-toc
assert_success
assert_equal "${lines[0]}" "GitHub TOC generator (gh-md-toc): 0.4.0"
assert_equal "${lines[1]}" "Usage:"
assert_equal "${lines[2]}" " gh-md-toc src [src] Create TOC for a README file (url or local path)"
assert_equal "${lines[3]}" " gh-md-toc - Create TOC for markdown from STDIN"
assert_equal "${lines[4]}" " gh-md-toc --help Show help"
assert_equal "${lines[5]}" " gh-md-toc --version Show help"
}

@test "--version" {
run $BATS_TEST_DIRNAME/../gh-md-toc --version
assert_success
Expand Down

0 comments on commit d750815

Please sign in to comment.