Skip to content

feat(assert): add arrays equal assertion#642

Merged
Chemaclass merged 3 commits intoTypedDevs:mainfrom
SauronBot:feat/issue-639-assert-arrays-equal
Apr 27, 2026
Merged

feat(assert): add arrays equal assertion#642
Chemaclass merged 3 commits intoTypedDevs:mainfrom
SauronBot:feat/issue-639-assert-arrays-equal

Conversation

@SauronBot
Copy link
Copy Markdown
Contributor

Summary

Adds a first-class assert_arrays_equal assertion for comparing expected and actual arrays separated by --.

Changes

  • Parse expected and actual arrays around a -- separator.
  • Fail on length mismatch with expected and actual lengths.
  • Fail on element mismatch with the differing index.
  • Document the new assertion and update the assertion docs snapshot.

Testing

  • bash ./bashunit tests/unit/assert_advanced_test.sh --filter arrays_equal
  • bash ./bashunit tests/acceptance/bashunit_test.sh --filter display_all_assert_docs
  • make test
  • bash -n src/assert_arrays.sh

make sa and make lint could not run locally because shellcheck and editorconfig-checker are not installed in this environment.

Closes #639

Copy link
Copy Markdown
Member

@Chemaclass Chemaclass left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@Chemaclass Chemaclass merged commit 753fa61 into TypedDevs:main Apr 27, 2026
30 checks passed
@Chemaclass
Copy link
Copy Markdown
Member

Missing chagelog update!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Assert arrays are equal

2 participants