Skip to content

Add hint for failing CharSequence contains due to different line separators - #2215

Open
Inf1mum wants to merge 1 commit into
robstoll:mainfrom
Inf1mum:issue-834
Open

Inf1mum wants to merge 1 commit into
robstoll:mainfrom
Inf1mum:issue-834

Conversation

@Inf1mum

@Inf1mum Inf1mum commented Nov 7, 2026

Copy link
Copy Markdown

Closes #834

Summary

  • show a hint when a failing toContain / toContain.ignoringCase search criterion would have matched if \r\n had been used instead of \n in the expected string (wording as agreed in warn if a CharSequence.contains and the like did not match because of different line endings #834)
  • the hint is shown per search criterion and only if the expectation would have been met with the fixed line separators; it is not shown for notToContain (such an expectation cannot fail because a search criterion did not match) nor for regex criteria
  • add DescriptionCharSequenceExpectation.WARNING_DIFFERENT_LINE_SEPARATORS translation (en_GB) and update the api dumps
  • add shared spec AbstractCharSequenceToContainLineSeparatorsHintTest with Fluent and Infix implementations

Testing

  • :atrium-specs:compileKotlinJvm
  • :atrium-api-fluent:jvmTest --tests "ch.tutteli.atrium.api.fluent.en_GB.CharSequenceToContainLineSeparatorsHintTest" and all other CharSequence* tests (435 passing)
  • :atrium-api-infix:jvmTest --tests "ch.tutteli.atrium.api.infix.en_GB.CharSequenceToContainLineSeparatorsHintTest" and all other CharSequence* tests (435 passing)
  • :atrium-translations-en_GB:apiCheck, :atrium-logic:apiCheck

I confirm that I have read the Contributor Agreements v1.0, agree to be bound on them and confirm that my contribution is compliant.

@Inf1mum
Inf1mum requested a review from robstoll as a code owner November 7, 2026 15:56

This branch has not been deployed

No deployments
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.

warn if a CharSequence.contains and the like did not match because of different line endings

1 participant