From 521777215d94d1b7a6121a1fb025b2d751ed3099 Mon Sep 17 00:00:00 2001 From: veg Date: Mon, 21 Sep 2026 09:48:23 +0000 Subject: [PATCH] style: no em-dash in test comments --- tests/50-host.bats | 2 +- tests/60-list-join-leave.bats | 2 +- tests/90-notifications.bats | 2 +- tests/95-stub-roundtrip.bats | 26 +++++++++++++------------- tests/96-unauthorized.bats | 8 ++++---- tests/helpers.bash | 2 +- 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/tests/50-host.bats b/tests/50-host.bats index be5ab26..c67448b 100644 --- a/tests/50-host.bats +++ b/tests/50-host.bats @@ -70,7 +70,7 @@ party_rec() { printf '%s/party-%s:%s.d/roster\n' "$PARTY_SOCKET_DIR" "$USER" "$1 @test "party close rejects bad names" { # Previous incarnation of this test edited HOST_USER in the roster # file and expected close to refuse. That's no longer the trust - # model — host identity is anchored on dir ownership, not file + # model: host identity is anchored on dir ownership, not file # content (commit 94befac), so editing HOST_USER is a no-op. # The "not the host" path now tests as: another user owns the dir, # which we can't fake without root. Coverage for the symlink and diff --git a/tests/60-list-join-leave.bats b/tests/60-list-join-leave.bats index 6642988..d1028f5 100644 --- a/tests/60-list-join-leave.bats +++ b/tests/60-list-join-leave.bats @@ -47,7 +47,7 @@ EOF # Cross-user discovery regression. Earlier revisions of party_conn_state # probed the PID with `kill -0`, which returns EPERM under POSIX semantics -# when the caller can't signal the target — illumos, all BSDs, and macOS +# when the caller can't signal the target: illumos, all BSDs, and macOS # honor that, so guests couldn't discover parties hosted by other users # on the same box. To simulate the foreign-uid case without privilege, # rewrite the roster's SERVER_PID to 1 (init/launchd, root-owned on every diff --git a/tests/90-notifications.bats b/tests/90-notifications.bats index e417fc5..2e421c2 100644 --- a/tests/90-notifications.bats +++ b/tests/90-notifications.bats @@ -26,7 +26,7 @@ party_rec() { printf '%s/party-%s:%s.d/roster\n' "$PARTY_SOCKET_DIR" "$USER" "$1 sr=$(tmux -S "$sock" show-options -gv status-right) [[ "$sr" == *"who --short"* ]] # The #() body is executed with the tmux server's PATH, which need - # not contain an installed `party` — the widget must pin the absolute + # not contain an installed `party`: the widget must pin the absolute # path of the script that hosted the party. [[ "$sr" == "party: #('/"* ]] } diff --git a/tests/95-stub-roundtrip.bats b/tests/95-stub-roundtrip.bats index adc292f..e40a5c7 100644 --- a/tests/95-stub-roundtrip.bats +++ b/tests/95-stub-roundtrip.bats @@ -113,7 +113,7 @@ party_rec() { printf '%s/party-%s:%s.d/roster\n' "$PARTY_SOCKET_DIR" "$USER" "$1 } @test "host --group records the chosen group in the roster" { - # The stub doesn't care which group we pick — exercise the path that + # The stub doesn't care which group we pick: exercise the path that # plumbs --group through to the GROUP= field. Use the caller's primary # group so chgrp succeeds. primary=$(id -gn) @@ -130,7 +130,7 @@ party_rec() { printf '%s/party-%s:%s.d/roster\n' "$PARTY_SOCKET_DIR" "$USER" "$1 @test "host with --group works without any pre-existing shared install dir" { # Regression: the old layout required /tmp/roster to be installed at # mode 1770 g=$TMUX_PARTY_GROUP at install time. The new layout has - # nothing of the sort — every party is self-contained under PARTY_SOCKET_DIR. + # nothing of the sort: every party is self-contained under PARTY_SOCKET_DIR. # Confirm `party host --group` succeeds with a clean sandbox that # never had a shared roster directory. primary=$(id -gn) @@ -165,7 +165,7 @@ party_rec() { printf '%s/party-%s:%s.d/roster\n' "$PARTY_SOCKET_DIR" "$USER" "$1 @test "host party_dir ends at mode 0750 even with permissive umask" { # Regression for the umask race: with umask 0002, plain `mkdir` would # produce 0775 until the later chmod 0750 closed the window. mkdir -m - # 0700 in cmd_host removes the window entirely — and the postcondition + # 0700 in cmd_host removes the window entirely, and the postcondition # is still 0750. ( umask 0002 && "$PARTY_BIN" host umasked ) party_dir="$PARTY_SOCKET_DIR/party-$USER:umasked.d" @@ -282,7 +282,7 @@ EOF # tmux must not have been touched: the recorder log has nothing for # this party. ! grep -q "kill-server" "$TMUX_LOG" - # Symlink and victim contents both intact — we did not chase the + # Symlink and victim contents both intact: we did not chase the # symlink to delete the attacker's tree. [ -L "$party_dir" ] [ -d "$victim" ] @@ -290,7 +290,7 @@ EOF } @test "host warns when PARTY_SOCKET_DIR is not group/world readable" { - # The sandbox parent is mode 0700 — trustworthy but undiscoverable to + # The sandbox parent is mode 0700, trustworthy but undiscoverable to # invitees. cmd_host should accept it (validator is happy) but emit # a warning so the host notices before sending invites. run "$PARTY_BIN" host noreach @@ -556,7 +556,7 @@ STUB # Trap fired: kill-server invoked against the derived socket. grep -q "$party_dir/sock kill-server" "$TMUX_LOG" - # Per-party dir is gone — no leftover roster, no leftover sock. + # Per-party dir is gone: no leftover roster, no leftover sock. [ ! -e "$party_dir" ] } @@ -577,7 +577,7 @@ STUB @test "host refuses leftover per-party dir without a roster" { # Simulate a prior incarnation that left a per-party dir behind with - # no roster (the rollback trap couldn't fire — SIGKILL or panic). + # no roster (the rollback trap couldn't fire: SIGKILL or panic). # cmd_host's mkdir-as-lock acquisition will fail with EEXIST. We # deliberately do NOT auto-clean: the same code path triggers on a # concurrent in-flight host attempt for the same name, and racing @@ -592,7 +592,7 @@ STUB [[ "$output" == *"already exists"* ]] [[ "$output" == *"party clean"* ]] - # The leftover dir is untouched — proves we did not race-clean. + # The leftover dir is untouched: proves we did not race-clean. [ -d "$party_dir" ] [ -e "$party_dir/sock" ] @@ -626,7 +626,7 @@ EOF } @test "roster_read rejects basename whose party name fails validate_party_name" { - # The basename glob (party-*:*.d) is permissive — names like '.' (basename + # The basename glob (party-*:*.d) is permissive: names like '.' (basename # party-USER:..d) match it. cmd_host's validate_party_name rejects '.' as # a reserved name; roster_read runs the same check on read so a forged # dir whose basename derives an illegal name can't pass. @@ -649,7 +649,7 @@ EOF } @test "cmd_list skips parties whose tmux list-clients fails" { - # SERVER_PID liveness alone doesn't prove a party is real — init's PID 1 + # SERVER_PID liveness alone doesn't prove a party is real: init's PID 1 # always passes, and a non-tmux daemon (or `nc -lU`) can hold a real # AF_UNIX socket. cmd_list must run list-clients and treat non-zero as # "not a real party," skipping the entry rather than reporting it with @@ -730,7 +730,7 @@ STUB # resolver. A roster can have a live SERVER_PID (PID reuse, init's pid 1) # and an [ -S ]-passing socket (planted via `nc -lU`) yet not be a real # tmux server. party_conn_state must probe list-clients on every resolver, - # not just cmd_list — otherwise `party join + # not just cmd_list, otherwise `party join # imposter` would resolve to the imposter and try to attach. legit_dir="$PARTY_SOCKET_DIR/party-$USER:legit2.d" mkdir -p "$legit_dir" && chmod 0750 "$legit_dir" @@ -785,7 +785,7 @@ STUB # cmd_host MUST require server-access at runtime, not just in the # README. tmux < 3.3 doesn't support the command, and silently # swallowing its failure (the prior behavior) would degrade the auth - # gate to nothing — group members with FS access could attach without + # gate to nothing: group members with FS access could attach without # being invited. cat > "$PARTY_TMUX" <<'STUB' #!/bin/sh @@ -804,7 +804,7 @@ case "$*" in echo "$FAKE_SERVER_PID" ;; *"server-access "*) - # Simulate tmux < 3.3 — command unknown. + # Simulate tmux < 3.3: command unknown. echo "unknown command: server-access" >&2 exit 1 ;; diff --git a/tests/96-unauthorized.bats b/tests/96-unauthorized.bats index f7c3f68..e042927 100644 --- a/tests/96-unauthorized.bats +++ b/tests/96-unauthorized.bats @@ -3,7 +3,7 @@ # Uninvited-guest semantics. tmux >= 3.3 answers a non-allowlisted # user's connection with "access not allowed" on stderr and EXIT 0 # (verified live on 3.3a and 3.5a with two real users), for every -# command — including has-session, which then reports any target as +# command, including has-session, which then reports any target as # existing. Exit-code-based checks therefore misclassified # "unauthorized" as "authorized": party status reported uninvited # members as joined, party leave silently "succeeded", and party list @@ -28,7 +28,7 @@ STUB # Plant a live-looking party dir + roster. Ownership is ours (bats # can't fake a foreign uid without root), so cmd_status will also see - # this fixture as "hosting" — that's orthogonal to the joined/leave + # this fixture as "hosting": that's orthogonal to the joined/leave # misreporting under test. ensure_party_dir "$USER" fiesta d="$PARTY_SOCKET_DIR/party-$USER:fiesta.d" @@ -88,7 +88,7 @@ STUB @test "read-only invitee joining active falls back to passive with a notice" { # tmux refuses new-session from a read-only client ("client is - # read-only", exit 1 — verified 3.3a/3.5a), so an active join for an + # read-only", exit 1, verified 3.3a/3.5a), so an active join for an # -r invitee died mid-command under set -eu. cmd_join must detect the # R flag on its own ACL line and attach passive instead. The unquoted # STUB delimiter is deliberate: $USER expands at write time, \$* at @@ -110,7 +110,7 @@ STUB @test "read-only invitee (U,R) flag format also falls back to passive" { # tmux refuses new-session from a read-only client ("client is - # read-only", exit 1 — verified 3.3a/3.5a), so an active join for an + # read-only", exit 1, verified 3.3a/3.5a), so an active join for an # -r invitee died mid-command under set -eu. cmd_join must detect the # R flag on its own ACL line and attach passive instead. The unquoted # STUB delimiter is deliberate: $USER expands at write time, \$* at diff --git a/tests/helpers.bash b/tests/helpers.bash index e537751..185b152 100644 --- a/tests/helpers.bash +++ b/tests/helpers.bash @@ -69,7 +69,7 @@ require_party_group() { || skip "user not in group '$g'; run: sudo usermod -aG $g $USER && relog" } -# Print one username per line for users in group $1 — both supplementary +# Print one username per line for users in group $1: both supplementary # members (4th /etc/group field) and primary-group members (passwd gid # match). Linux / illumos / FreeBSD / OpenBSD use getent(1); macOS has # no getent and stores users in Directory Services, so fall back to