Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(widget): add unit tests for Paragraph #156

Merged
merged 1 commit into from
May 4, 2023

Conversation

joshka
Copy link
Member

@joshka joshka commented Apr 29, 2023

Putting this in place to help ensure #149 doesn't break anything.

I wasn't 100% certain how the zero_width_char_at_end_of_line test was supposed to actually fail / not-fail as there's no assertion. Rewrote it to conform to the pattern of the other tests (but perhaps @orhun and @rhysd can add a bit more context if this is incorrect?

@joshka
Copy link
Member Author

joshka commented Apr 29, 2023

Ping @TimerErTim for a review

@joshka
Copy link
Member Author

joshka commented Apr 29, 2023

Force pushed formatting fixes

Copy link
Contributor

@TimerErTim TimerErTim left a comment

Choose a reason for hiding this comment

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

The test cases generally look good, I will integrate them into my branch. I will extend them there when I can think of new/expanded ones.

src/widgets/paragraph.rs Outdated Show resolved Hide resolved
@joshka
Copy link
Member Author

joshka commented May 1, 2023

Rebased on #161 to use assert_buffer_eq! instead of assert_eq

Copy link
Collaborator

@sophacles sophacles left a comment

Choose a reason for hiding this comment

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

Yay tests!

@orhun orhun changed the title chore: add unit tests for Paragraph test(widget): add unit tests for Paragraph May 4, 2023
@orhun orhun merged commit cf1a759 into ratatui-org:main May 4, 2023
7 checks passed
@joshka joshka deleted the test-paragraph branch May 9, 2023 21:23
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.

None yet

4 participants