Skip to content

Commit e689db6

Browse files
authored
refactor(state): split src/state.sh into a src/state/ module (#946)
1 parent 23e3529 commit e689db6

10 files changed

Lines changed: 491 additions & 411 deletions

File tree

‎.claude/rules/architecture-map.md‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,12 @@ shell (or, in parallel, in per-test `.result` files aggregated at the end).
6464
| `helper/discovery.sh` | `find_files_recursive`, `find_total_tests`, fn filtering, duplicate check, line lookup |
6565
| `helper/provider.sh` / `helper/tags.sh` | `@data_provider` map; `@tag` extraction and matching |
6666
| `helper/encoding.sh` / `helper/functions.sh` / `helper/git.sh` | base64 + ids; generic fn utilities; remote tag lookup for `upgrade` |
67-
| `state.sh` | counters, per-test payload encode/decode, TAP conversion |
67+
| `state/index.sh` | aggregator only — sources the `src/state/` module below |
68+
| `state/counters.sh` | test and assertion tallies and their get/add accessors |
69+
| `state/duplicates.sh` | duplicate test-function detection state |
70+
| `state/context.sh` | per-test output buffer, exit code, title, hook failure, and the per-test reset |
71+
| `state/payload.sh` | the encoded per-test result payload and the base64 capability probe |
72+
| `state/parallel.sh` | aggregating per-test result files after a `--parallel` run |
6873
| `env.sh` | all `BASHUNIT_*` defaults/config files, scratch dirs (`_BASHUNIT_RUN_OUTPUT_DIR` + EXIT-trap cleanup) |
6974
| `parallel.sh` | worker temp tree, aggregation, stop-on-failure flag file |
7075
| `console/index.sh` | aggregator only — sources the `src/console/` module below |

‎bashunit‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ source "$BASHUNIT_ROOT_DIR/src/parallel.sh"
7575
source "$BASHUNIT_ROOT_DIR/src/env.sh"
7676
source "$BASHUNIT_ROOT_DIR/src/coverage/index.sh"
7777
source "$BASHUNIT_ROOT_DIR/src/clock.sh"
78-
source "$BASHUNIT_ROOT_DIR/src/state.sh"
78+
source "$BASHUNIT_ROOT_DIR/src/state/index.sh"
7979
source "$BASHUNIT_ROOT_DIR/src/console/index.sh"
8080
source "$BASHUNIT_ROOT_DIR/src/helper/index.sh"
8181
source "$BASHUNIT_ROOT_DIR/src/test_title.sh"

0 commit comments

Comments
 (0)