Skip to content

Commit a49da72

Browse files
chore: remove redundant grep tests from test-plugin-retro-gather.sh (merge worktree-20260323-193735)
2 parents e638da5 + e4982dd commit a49da72

File tree

2 files changed

+6
-57
lines changed

2 files changed

+6
-57
lines changed

plugins/dso/.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dso",
3-
"version": "0.25.19",
3+
"version": "0.25.20",
44
"description": "Workflow infrastructure plugin for Claude Code projects",
55
"commands": "./commands/",
66
"skills": "./skills/",

tests/scripts/test-plugin-retro-gather.sh

Lines changed: 5 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -70,65 +70,14 @@ fi
7070
assert_eq "test_no_hardcoded_prefix" "0" "$hardcoded_count"
7171

7272
# ---------------------------------------------------------------------------
73-
# Test 4: Script references read-config.sh for session.artifact_prefix
73+
# (Tests for read-config.sh reference, basename fallback, tr transform, and
74+
# ARTIFACT_PREFIX variable usage are covered behaviorally by tests 9-13 below:
75+
# derive_prefix edge cases prove the transformation, and the integration tests
76+
# prove config reading and fallback resolution work end-to-end.)
7477
# ---------------------------------------------------------------------------
75-
echo "Test 4: script reads session.artifact_prefix via read-config.sh"
76-
reads_config=0
77-
if [ -f "$PLUGIN_SCRIPT" ]; then
78-
if grep -qE 'read-config\.sh.*session\.artifact_prefix|session\.artifact_prefix.*read-config' "$PLUGIN_SCRIPT" 2>/dev/null; then
79-
reads_config=1
80-
fi
81-
fi
82-
assert_eq "test_reads_config_session_artifact_prefix" "1" "$reads_config"
83-
84-
# ---------------------------------------------------------------------------
85-
# Test 5: Script falls back to basename of REPO_ROOT
86-
# ---------------------------------------------------------------------------
87-
echo "Test 5: script has fallback derivation from basename of REPO_ROOT"
88-
has_basename_fallback=0
89-
if [ -f "$PLUGIN_SCRIPT" ]; then
90-
if grep -qE 'basename.*REPO_ROOT|REPO_ROOT.*basename' "$PLUGIN_SCRIPT" 2>/dev/null; then
91-
has_basename_fallback=1
92-
fi
93-
fi
94-
assert_eq "test_fallback_uses_basename" "1" "$has_basename_fallback"
95-
96-
# ---------------------------------------------------------------------------
97-
# Test 6: Fallback derivation handles special chars (tr for lowercase/a-z0-9-)
98-
# ---------------------------------------------------------------------------
99-
echo "Test 6: fallback derivation handles dots, underscores, uppercase"
100-
has_transform=0
101-
if [ -f "$PLUGIN_SCRIPT" ]; then
102-
if grep -qE "tr.*\[\[:upper:\]\].*\[\[:lower:\]\]|tr.*'a-z0-9-'" "$PLUGIN_SCRIPT" 2>/dev/null; then
103-
has_transform=1
104-
fi
105-
fi
106-
assert_eq "test_fallback_handles_special_chars" "1" "$has_transform"
107-
108-
# ---------------------------------------------------------------------------
109-
# Test 7: Script contains GATHER_COMPLETE section (smoke test of completeness)
110-
# ---------------------------------------------------------------------------
111-
echo "Test 7: script contains GATHER_COMPLETE section"
112-
has_gather_complete=0
113-
if [ -f "$PLUGIN_SCRIPT" ]; then
114-
grep -q 'GATHER_COMPLETE' "$PLUGIN_SCRIPT" && has_gather_complete=1
115-
fi
116-
assert_eq "test_gather_complete_section_present" "1" "$has_gather_complete"
117-
118-
# ---------------------------------------------------------------------------
119-
# Test 8: ARTIFACT_PREFIX variable is used in the timeout log glob pattern
120-
# ---------------------------------------------------------------------------
121-
echo "Test 8: ARTIFACT_PREFIX variable used in glob pattern"
122-
uses_prefix_var=0
123-
if [ -f "$PLUGIN_SCRIPT" ]; then
124-
if grep -qE '\$\{?ARTIFACT_PREFIX\}?' "$PLUGIN_SCRIPT" 2>/dev/null; then
125-
uses_prefix_var=1
126-
fi
127-
fi
128-
assert_eq "test_config_prefix_used_in_glob" "1" "$uses_prefix_var"
12978

13079
# ---------------------------------------------------------------------------
131-
# Tests 9-11: Functional tests of the fallback derivation logic.
80+
# Tests 4-6: Functional tests of the fallback derivation logic.
13281
# We inline the derivation from the script spec and verify edge cases.
13382
# ---------------------------------------------------------------------------
13483

0 commit comments

Comments
 (0)