Initial pre-release
tmux-party: share a tmux session with people on the same UNIX host. Single-file POSIX shell (party) with a filesystem + tmux server-access trust model. See README.md.
This commit is contained in:
commit
6be0ac1877
20 changed files with 3869 additions and 0 deletions
33
tests/10-skeleton.bats
Normal file
33
tests/10-skeleton.bats
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
#!/usr/bin/env bats
|
||||
|
||||
load 'helpers'
|
||||
|
||||
setup() { setup_party_sandbox; }
|
||||
teardown() { teardown_party_sandbox; }
|
||||
|
||||
@test "party with no args prints usage and exits non-zero" {
|
||||
run "$PARTY_BIN"
|
||||
[ "$status" -ne 0 ]
|
||||
[[ "$output" == *"Usage:"* ]]
|
||||
[[ "$output" == *"host"* ]]
|
||||
[[ "$output" == *"join"* ]]
|
||||
}
|
||||
|
||||
@test "party --help prints usage and exits zero" {
|
||||
run "$PARTY_BIN" --help
|
||||
[ "$status" -eq 0 ]
|
||||
[[ "$output" == *"Usage:"* ]]
|
||||
}
|
||||
|
||||
@test "party rejects unknown subcommands" {
|
||||
run "$PARTY_BIN" rumpelstiltskin
|
||||
[ "$status" -ne 0 ]
|
||||
[[ "$output" == *"unknown subcommand"* ]]
|
||||
}
|
||||
|
||||
@test "library mode: source returns without dispatching" {
|
||||
load_party_lib
|
||||
# If the script ran dispatch, we'd never get here. Reaching this
|
||||
# assertion is the test.
|
||||
[ -n "${PARTY_VERSION:-}" ]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue