Skip to content

test(main): pin set_shard_or_exit's --shard spec validation#824

Merged
Chemaclass merged 1 commit into
mainfrom
test/shard-spec-validation
Jul 16, 2026
Merged

test(main): pin set_shard_or_exit's --shard spec validation#824
Chemaclass merged 1 commit into
mainfrom
test/shard-spec-validation

Conversation

@Chemaclass

Copy link
Copy Markdown
Member

🤔 Background

--shard's slice arithmetic depends on set_shard_or_exit's validation; acceptance tests cover two invalid specs but none of the boundaries.

💡 Changes

  • First unit tests for src/main.sh: 4/4 and 1/1 accepted (off-by-one guards), index/total zero, missing slash, empty/partial specs, negative/decorated numbers rejected.
  • Invalid specs exit the shell, so each call runs in a subshell.

First unit tests for src/main.sh. --shard's slice arithmetic depends on this
validation; pin the boundaries the acceptance tests don't reach: index==total
and 1/1 accepted; index 0, total 0, missing slash, empty/partial specs, and
negative/decorated numbers all rejected. Invalid specs exit the shell, so
every call runs in a subshell.
@Chemaclass Chemaclass added the enhancement New feature or request label Jul 16, 2026
@Chemaclass Chemaclass self-assigned this Jul 16, 2026
@Chemaclass
Chemaclass merged commit 9a257eb into main Jul 16, 2026
37 checks passed
@Chemaclass
Chemaclass deleted the test/shard-spec-validation branch July 16, 2026 05:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant