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
45
tests/99-e2e.bats
Normal file
45
tests/99-e2e.bats
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
#!/usr/bin/env bats
|
||||
|
||||
load 'helpers'
|
||||
|
||||
setup() {
|
||||
setup_party_sandbox
|
||||
require_party_group
|
||||
}
|
||||
teardown() { teardown_party_sandbox; }
|
||||
|
||||
@test "full lifecycle: host → invite → voice → mute → kick → close" {
|
||||
other=$(pick_other_user)
|
||||
[ -n "$other" ] || skip "no second user on this box"
|
||||
|
||||
"$PARTY_BIN" host e2e
|
||||
|
||||
# discover
|
||||
run "$PARTY_BIN" list
|
||||
[[ "$output" == *"e2e"* ]]
|
||||
|
||||
# invite
|
||||
"$PARTY_BIN" invite "$other" -r
|
||||
rec="$PARTY_SOCKET_DIR/party-$USER:e2e.d/roster"
|
||||
sock=$(awk -F= '$1=="SOCKET"{print $2}' "$rec")
|
||||
tmux -S "$sock" server-access -l | grep -q "^$other"
|
||||
|
||||
# voice → mute
|
||||
"$PARTY_BIN" voice "$other"
|
||||
"$PARTY_BIN" mute "$other"
|
||||
|
||||
# kick
|
||||
"$PARTY_BIN" kick "$other"
|
||||
|
||||
# close
|
||||
"$PARTY_BIN" close e2e
|
||||
[ ! -f "$rec" ]
|
||||
[ ! -S "$sock" ]
|
||||
}
|
||||
|
||||
@test "all subcommands appear in --help" {
|
||||
run "$PARTY_BIN" --help
|
||||
for sub in host close join leave invite voice mute kick detach role list who status; do
|
||||
[[ "$output" == *"$sub"* ]] || { echo "missing in --help: $sub"; false; }
|
||||
done
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue