Skip to content

Commit cfba59e

Browse files
garyshengclaude
andcommitted
fix: update test manifests to use CESP standard category names
Tests were using old category names (greeting, complete, permission, annoyed) but peon.sh was migrated to CESP standard (session.start, task.complete, input.required, user.spam), causing 28 test failures. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 3aeb4f6 commit cfba59e

2 files changed

Lines changed: 30 additions & 30 deletions

File tree

tests/peon.bats

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ JSON
114114
cat > "$TEST_DIR/config.json" <<'JSON'
115115
{
116116
"active_pack": "peon", "volume": 0.5, "enabled": true,
117-
"categories": { "greeting": false }
117+
"categories": { "session.start": false }
118118
}
119119
JSON
120120
run_peon '{"hook_event_name":"SessionStart","cwd":"/tmp/myproject","session_id":"s1","permission_mode":"default"}'
@@ -228,7 +228,7 @@ JSON
228228
cat > "$TEST_DIR/config.json" <<'JSON'
229229
{
230230
"active_pack": "peon", "volume": 0.5, "enabled": true,
231-
"categories": { "annoyed": false },
231+
"categories": { "user.spam": false },
232232
"annoyed_threshold": 3, "annoyed_window_seconds": 10
233233
}
234234
JSON

tests/setup.bash

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,43 +9,43 @@ setup_test_env() {
99
mkdir -p "$TEST_DIR/packs/peon/sounds"
1010
mkdir -p "$TEST_DIR/packs/sc_kerrigan/sounds"
1111

12-
# Create minimal manifest
12+
# Create minimal manifest (CESP category names)
1313
cat > "$TEST_DIR/packs/peon/manifest.json" <<'JSON'
1414
{
1515
"name": "peon",
1616
"display_name": "Orc Peon",
1717
"categories": {
18-
"greeting": {
18+
"session.start": {
1919
"sounds": [
20-
{ "file": "Hello1.wav", "line": "Ready to work?" },
21-
{ "file": "Hello2.wav", "line": "Yes?" }
20+
{ "file": "Hello1.wav", "label": "Ready to work?" },
21+
{ "file": "Hello2.wav", "label": "Yes?" }
2222
]
2323
},
24-
"acknowledge": {
24+
"task.acknowledge": {
2525
"sounds": [
26-
{ "file": "Ack1.wav", "line": "Work, work." }
26+
{ "file": "Ack1.wav", "label": "Work, work." }
2727
]
2828
},
29-
"complete": {
29+
"task.complete": {
3030
"sounds": [
31-
{ "file": "Done1.wav", "line": "Something need doing?" },
32-
{ "file": "Done2.wav", "line": "Ready to work?" }
31+
{ "file": "Done1.wav", "label": "Something need doing?" },
32+
{ "file": "Done2.wav", "label": "Ready to work?" }
3333
]
3434
},
35-
"error": {
35+
"task.error": {
3636
"sounds": [
37-
{ "file": "Error1.wav", "line": "Me not that kind of orc!" }
37+
{ "file": "Error1.wav", "label": "Me not that kind of orc!" }
3838
]
3939
},
40-
"permission": {
40+
"input.required": {
4141
"sounds": [
42-
{ "file": "Perm1.wav", "line": "Something need doing?" },
43-
{ "file": "Perm2.wav", "line": "Hmm?" }
42+
{ "file": "Perm1.wav", "label": "Something need doing?" },
43+
{ "file": "Perm2.wav", "label": "Hmm?" }
4444
]
4545
},
46-
"annoyed": {
46+
"user.spam": {
4747
"sounds": [
48-
{ "file": "Angry1.wav", "line": "Me busy, leave me alone!" }
48+
{ "file": "Angry1.wav", "label": "Me busy, leave me alone!" }
4949
]
5050
}
5151
}
@@ -63,14 +63,14 @@ JSON
6363
"name": "sc_kerrigan",
6464
"display_name": "Sarah Kerrigan (StarCraft)",
6565
"categories": {
66-
"greeting": {
66+
"session.start": {
6767
"sounds": [
68-
{ "file": "Hello1.wav", "line": "What now?" }
68+
{ "file": "Hello1.wav", "label": "What now?" }
6969
]
7070
},
71-
"complete": {
71+
"task.complete": {
7272
"sounds": [
73-
{ "file": "Done1.wav", "line": "I gotcha." }
73+
{ "file": "Done1.wav", "label": "I gotcha." }
7474
]
7575
}
7676
}
@@ -81,20 +81,20 @@ JSON
8181
touch "$TEST_DIR/packs/sc_kerrigan/sounds/$f"
8282
done
8383

84-
# Create default config
84+
# Create default config (CESP category names)
8585
cat > "$TEST_DIR/config.json" <<'JSON'
8686
{
8787
"active_pack": "peon",
8888
"volume": 0.5,
8989
"enabled": true,
9090
"categories": {
91-
"greeting": true,
92-
"acknowledge": true,
93-
"complete": true,
94-
"error": true,
95-
"permission": true,
96-
"resource_limit": true,
97-
"annoyed": true
91+
"session.start": true,
92+
"task.acknowledge": true,
93+
"task.complete": true,
94+
"task.error": true,
95+
"input.required": true,
96+
"resource.limit": true,
97+
"user.spam": true
9898
},
9999
"annoyed_threshold": 3,
100100
"annoyed_window_seconds": 10

0 commit comments

Comments
 (0)