Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions scripts/check-shell-portability.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ SELF_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "$SELF_DIR/.." && pwd)"
SCRIPT="$SELF_DIR/check-shell-portability.sh"
REAL_TOKENS="$REPO_ROOT/scripts/shell-portability-tokens.txt"
. "$SELF_DIR/test-git-helpers.sh"

PASS=0
FAIL=0
Expand Down Expand Up @@ -1543,9 +1544,7 @@ mkdir -p "$fx/scripts" "$fx/plugins/alpha/skills/demo/context"
cp "$SCRIPT" "$fx/scripts/"
out="$(
cd "$fx" &&
git -C "$fx" init -q &&
git -C "$fx" config user.email test@example.com &&
git -C "$fx" config user.name test &&
git_init_test_repo "$fx" &&
git -C "$fx" commit -q --allow-empty -m base &&
base="$(git -C "$fx" rev-parse HEAD)" &&
printf '%s\n' 'stat -c %Y "$f"' >'plugins/alpha/skills/demo/context/mtime.md' &&
Expand Down Expand Up @@ -1639,9 +1638,7 @@ cp "$SCRIPT" "$fx/scripts/"
quoted_name="$(printf 'quoted-\303\251.sh')" # trailing U+00E9 byte -- non-ASCII, triggers Git quoting
out="$(
cd "$fx" &&
git -C "$fx" init -q &&
git -C "$fx" config user.email test@example.com &&
git -C "$fx" config user.name test &&
git_init_test_repo "$fx" &&
git -C "$fx" commit -q --allow-empty -m base &&
base="$(git -C "$fx" rev-parse HEAD)" &&
printf '%s\n' 'grep -Eq "\\bfoo\\b" "$file"' >'plain.sh' &&
Expand Down
5 changes: 2 additions & 3 deletions scripts/check-skill-portability.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ SELF_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "$SELF_DIR/.." && pwd)"
SCRIPT="$SELF_DIR/check-skill-portability.sh"
REAL_TOKENS="$REPO_ROOT/scripts/skill-portability-tokens.txt"
. "$SELF_DIR/test-git-helpers.sh"

# Minimal token list: just the active branch class, so a synthetic case is not
# coupled to the shipping list's staged entries.
Expand Down Expand Up @@ -669,9 +670,7 @@ cp "$SCRIPT" "$fx/scripts/"
quoted_name="$(printf 'quoted-\303\251.md')" # trailing U+00E9 byte — non-ASCII, triggers Git quoting
out="$(
cd "$fx" &&
git -C "$fx" init -q &&
git -C "$fx" config user.email test@example.com &&
git -C "$fx" config user.name test &&
git_init_test_repo "$fx" &&
git -C "$fx" commit -q --allow-empty -m base &&
base="$(git -C "$fx" rev-parse HEAD)" &&
mkdir -p 'plugins/p/skills/s' &&
Expand Down
3 changes: 0 additions & 3 deletions scripts/fixture-git-isolation-baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,4 @@ plugins/testing/skills/audit/scripts/cant-fail-scan.test.sh
plugins/typos-format/hooks/typos-format.test.sh
plugins/work-items/skills/work/scripts/preflight.test.sh
scripts/check-contract-slice-prune.test.sh
scripts/check-shell-portability.test.sh
scripts/check-skill-portability.test.sh
scripts/check-stale-base-overlap.test.sh
scripts/sync-standards-contract.test.sh
8 changes: 4 additions & 4 deletions scripts/sync-standards-contract.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ set -uo pipefail

SELF_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SCRIPT="$SELF_DIR/sync-standards-contract.sh"
. "$SELF_DIR/test-git-helpers.sh"

PASS=0
FAIL=0
Expand Down Expand Up @@ -76,10 +77,9 @@ base_fixture() {
# git_fixture <fixture> → init repo + commit everything as the base ref; prints base sha
git_fixture() {
local fixture="$1"
git -C "$fixture" init -q
git -C "$fixture" config core.autocrlf false
git -C "$fixture" config user.email test@example.com
git -C "$fixture" config user.name test
# On refusal (e.g. TMPDIR inside the checkout) stop before add/commit can
# resolve to the enclosing real repository.
git_init_test_repo "$fixture" || return 1
git -C "$fixture" add -A
git -C "$fixture" commit -qm base
git -C "$fixture" rev-parse HEAD
Expand Down