From 90394464e0722f006e9b059c0f3fda46de6cac92 Mon Sep 17 00:00:00 2001 From: Defame1297 Date: Sun, 6 Dec 2026 17:04:36 +0000 Subject: [PATCH] test(install): cover the built-in plugin settings and their merge Refs #286 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi --- tests/test-install.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tests/test-install.sh b/tests/test-install.sh index 3b08809..c081bc6 100755 --- a/tests/test-install.sh +++ b/tests/test-install.sh @@ -109,6 +109,9 @@ check_json() { check_json "$SETTINGS_SRC" \ 's["disableBundledSkills"] is True and s["syncClaudeAiSkills"] is False and s["env"]["CLAUDE_CODE_DISABLE_SHIP"] == "1" and s["skillOverrides"]["init"] == "off"' \ "repo settings turn off bundled and synced skills" +check_json "$SETTINGS_SRC" \ + 'all(s["skillOverrides"][k] == "off" for k in ("design", "doctor", "plugin-authoring")) and s["enabledPlugins"]["cc-plugin-easel@builtin"] is False and s["enabledPlugins"]["cc-plugin-plugin-authoring@builtin"] is False and s["syncClaudeAiPlugins"] is False' \ + "repo settings turn off built-in plugin skills and synced plugins" MERGE_HOME="$(new_home)" MERGED="$MERGE_HOME/.claude/settings.json" @@ -118,7 +121,8 @@ cat > "$MERGED" << 'EOF' "theme": "light", "permissions": {"allow": ["Bash(ls:*)"]}, "env": {"MY_VAR": "kept", "CLAUDE_CODE_DISABLE_SHIP": "0"}, - "skillOverrides": {"other": "off", "init": "on"} + "skillOverrides": {"other": "off", "init": "on"}, + "enabledPlugins": {"operator-plugin@x": true, "cc-plugin-easel@builtin": true} } EOF chmod 640 "$MERGED" @@ -132,6 +136,14 @@ check_json "$MERGED" 's["theme"] == "dark" and s["env"]["CLAUDE_CODE_DISABLE_SHI "the repo's value wins where both set one" check_json "$MERGED" 's["disableBundledSkills"] is True and s["syncClaudeAiSkills"] is False' \ "settings only the repo has are added" +check_json "$MERGED" 's["enabledPlugins"]["operator-plugin@x"] is True' \ + "the operator's own plugin entries are kept" +check_json "$MERGED" 's["enabledPlugins"]["cc-plugin-easel@builtin"] is False and s["enabledPlugins"]["cc-plugin-plugin-authoring@builtin"] is False' \ + "the repo turns off built-in plugins the operator had enabled" +check_json "$MERGED" 's["skillOverrides"]["other"] == "off" and all(s["skillOverrides"][k] == "off" for k in ("design", "doctor", "plugin-authoring"))' \ + "new skill overrides are added beside the operator's own" +check_json "$MERGED" 's["syncClaudeAiPlugins"] is False' \ + "plugin sync is turned off in merged settings" if [[ "$(find "$MERGED" -perm 640)" == "$MERGED" ]]; then pass "the existing file's permissions are kept"