summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/hooks/test-session-start.sh44
1 files changed, 4 insertions, 40 deletions
diff --git a/tests/hooks/test-session-start.sh b/tests/hooks/test-session-start.sh
index 989d72c..b027f3c 100755
--- a/tests/hooks/test-session-start.sh
+++ b/tests/hooks/test-session-start.sh
@@ -4,7 +4,6 @@ set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
HOOK_UNDER_TEST="$REPO_ROOT/hooks/session-start"
-CODEX_HOOK_UNDER_TEST="$REPO_ROOT/hooks/session-start-codex"
WRAPPER_UNDER_TEST="$REPO_ROOT/hooks/run-hook.cmd"
FAILURES=0
@@ -154,35 +153,15 @@ assert_command_output \
CLAUDE_PLUGIN_ROOT="$REPO_ROOT" \
bash "$HOOK_UNDER_TEST"
-codex_home="$(make_home codex-plugin-hooks)"
-codex_data="$TEST_ROOT/codex-plugin-hooks/data"
-mkdir -p "$codex_data"
+wrapper_home="$(make_home run-hook-wrapper)"
assert_command_output \
- "Codex plugin hooks use dedicated script and emit nested SessionStart additionalContext" \
+ "run-hook.cmd wrapper dispatches to the named session-start script" \
"nested" \
"" \
"" \
- "$codex_home" \
- PLUGIN_DATA="$codex_data" \
- CLAUDE_PLUGIN_DATA="$codex_data" \
- PLUGIN_ROOT="$REPO_ROOT" \
+ "$wrapper_home" \
CLAUDE_PLUGIN_ROOT="$REPO_ROOT" \
- bash "$CODEX_HOOK_UNDER_TEST"
-
-codex_wrapper_home="$(make_home codex-wrapper)"
-codex_wrapper_data="$TEST_ROOT/codex-wrapper/data"
-mkdir -p "$codex_wrapper_data"
-assert_command_output \
- "Codex wrapper path dispatches to dedicated script" \
- "nested" \
- "" \
- "" \
- "$codex_wrapper_home" \
- PLUGIN_DATA="$codex_wrapper_data" \
- CLAUDE_PLUGIN_DATA="$codex_wrapper_data" \
- PLUGIN_ROOT="$REPO_ROOT" \
- CLAUDE_PLUGIN_ROOT="$REPO_ROOT" \
- bash "$WRAPPER_UNDER_TEST" session-start-codex
+ bash "$WRAPPER_UNDER_TEST" session-start
cursor_home="$(make_home cursor)"
assert_command_output \
@@ -217,21 +196,6 @@ assert_command_output \
CLAUDE_PLUGIN_ROOT="$REPO_ROOT" \
bash "$HOOK_UNDER_TEST"
-codex_legacy_home="$(make_home codex-legacy-warning-removed)"
-codex_legacy_data="$TEST_ROOT/codex-legacy-warning-removed/data"
-mkdir -p "$codex_legacy_home/.config/superpowers/skills" "$codex_legacy_data"
-assert_command_output \
- "Codex SessionStart omits obsolete legacy custom-skill warning" \
- "nested" \
- "" \
- "Superpowers now uses"$'\037'"~/.config/superpowers/skills"$'\037'"~/.claude/skills"$'\037'"legacy" \
- "$codex_legacy_home" \
- PLUGIN_DATA="$codex_legacy_data" \
- CLAUDE_PLUGIN_DATA="$codex_legacy_data" \
- PLUGIN_ROOT="$REPO_ROOT" \
- CLAUDE_PLUGIN_ROOT="$REPO_ROOT" \
- bash "$CODEX_HOOK_UNDER_TEST"
-
if [[ "$FAILURES" -gt 0 ]]; then
echo "STATUS: FAILED ($FAILURES failure(s))"
exit 1