aboutsummaryrefslogtreecommitdiff
path: root/t/website.bats
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2020-02-05 00:23:23 -0300
committerEuAndreh <eu@euandre.org>2020-02-05 00:23:23 -0300
commitd935cd37ee3566091b706702474265b3a5136f2d (patch)
tree7bb57f941d6b612402761c3e3a8b41e2bea72596 /t/website.bats
parentAdd code metadata annotation (diff)
downloadeuandre.org-d935cd37ee3566091b706702474265b3a5136f2d.tar.gz
euandre.org-d935cd37ee3566091b706702474265b3a5136f2d.tar.xz
Delete old files
Diffstat (limited to 't/website.bats')
-rwxr-xr-xt/website.bats70
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:" ]]
-}