diff options
author | EuAndreh <eu@euandre.org> | 2020-02-05 00:23:23 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2020-02-05 00:23:23 -0300 |
commit | d935cd37ee3566091b706702474265b3a5136f2d (patch) | |
tree | 7bb57f941d6b612402761c3e3a8b41e2bea72596 /t | |
parent | Add code metadata annotation (diff) | |
download | euandre.org-d935cd37ee3566091b706702474265b3a5136f2d.tar.gz euandre.org-d935cd37ee3566091b706702474265b3a5136f2d.tar.xz |
Delete old files
Diffstat (limited to 't')
-rwxr-xr-x | t/website.bats | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/t/website.bats b/t/website.bats deleted file mode 100755 index 5bbfb59..0000000 --- a/t/website.bats +++ /dev/null @@ -1,70 +0,0 @@ -#!/usr/bin/env bats - -# Go to the directory where ./website is. -cd "$BATS_TEST_DIRNAME/../" - -# exit code 1: error running command -# exit code 2: couldn't parse the command line argument - -@test "Help: show short usage when no subcommand is given, exit code is 2" { - run ./website - [[ "$status" -eq 2 ]] - [[ "${lines[0]}" =~ "Missing subcommand." ]] - [[ "${lines[1]}" = "Usage:" ]] -} - -@test "Help: show short usage for unknown subcommand, exit code is 2" { - run ./website bad-subcommand - [[ "$status" -eq 2 ]] - [[ "${lines[0]}" =~ "Unknown subcommand: bad-subcommand." ]] - [[ "${lines[1]}" = "Usage:" ]] -} - -@test "Help: show full toplevel help" { - run ./website --help - [[ "$status" -eq 0 ]] - [[ "${lines[0]}" = "NAME" ]] - run ./website -h - [[ "$status" -eq 0 ]] - [[ "${lines[0]}" = "NAME" ]] -} - -@test "Help: show short subcommand usage when subcommand isn't invoked properly, exit code is 2" { - run ./website pastebin - [[ "$status" -eq 2 ]] - [[ "${lines[0]}" =~ "Missing required --title argument." ]] - [[ "${lines[1]}" = "Usage:" ]] - run ./website slides - [[ "$status" -eq 2 ]] - [[ "${lines[0]}" =~ "Missing required --name argument." ]] - [[ "${lines[1]}" = "Usage:" ]] -} - -@test "Help: show subcommand manpage" { - run ./website pastebin -h - [[ "$status" -eq 0 ]] - [[ "${lines[0]}" = "NAME" ]] - run ./website pastebin --help - [[ "$status" -eq 0 ]] - [[ "${lines[0]}" = "NAME" ]] - run ./website slides -h - [[ "$status" -eq 0 ]] - [[ "${lines[0]}" = "NAME" ]] - run ./website slides --help - [[ "$status" -eq 0 ]] - [[ "${lines[0]}" = "NAME" ]] -} - -@test "Pastebin: required input for --title" { - run ./website pastebin --title - [[ "$status" = 2 ]] - [[ "${lines[0]}" = "Option title requires an argument" ]] - [[ "${lines[1]}" = "Usage:" ]] -} - -@test "Slides: required input for --name" { - run ./website slides --name - [[ "$status" = 2 ]] - [[ "${lines[0]}" = "Option name requires an argument" ]] - [[ "${lines[1]}" = "Usage:" ]] -} |