Skip to content

Add spec for newline detection#210

Draft
webdevred wants to merge 1 commit into
masterfrom
verify-newline-detection
Draft

Add spec for newline detection#210
webdevred wants to merge 1 commit into
masterfrom
verify-newline-detection

Conversation

@webdevred

Copy link
Copy Markdown
Owner

Failing spec that defines the contract for a newline detector, ahead of the implementation (TDD).

test/Core/NewlineSpec.hs expects detectNewline :: Text -> Newline in JbeamEdit.Core.Newline, reusing base's System.IO.Newline (LF/CRLF) rather than a bespoke type. Cases: unix \n is LF, windows \r\n is CRLF, mixed endings are CRLF, and text without a line ending defaults to LF.

The suite does not compile until detectNewline exists, so this branch is red on purpose. The module path is a suggestion, move it and adjust the import if you prefer.

Relates to #209.

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.

1 participant