Page MenuHomeFreeBSD

wc: Improve test coverage.
ClosedPublic

Authored by des on Feb 15 2023, 1:11 PM.
Tags
None
Referenced Files
F86260085: D38605.id117345.diff
Mon, Jun 17, 6:38 PM
Unknown Object (File)
Mon, May 27, 12:39 PM
Unknown Object (File)
May 16 2024, 4:53 PM
Unknown Object (File)
May 15 2024, 8:11 PM
Unknown Object (File)
Feb 20 2024, 2:25 AM
Unknown Object (File)
Feb 11 2024, 6:40 PM
Unknown Object (File)
Jan 28 2024, 12:37 PM
Unknown Object (File)
Jan 28 2024, 8:08 AM

Details

Summary
  • Add a test that causes mbrtowc() to return 0.
  • Add a test that causes mbrtowc() to return -2.

Sponsred by: Klara, Inc.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 49801
Build 46692: arc lint + arc unit

Event Timeline

des requested review of this revision.Feb 15 2023, 1:11 PM
des retitled this revision from wc: Improve test coverage to wc: Improve test coverage..Feb 15 2023, 2:49 PM

Elegant test implementation! I wonder if the Freudians will find it too scatological.

emaste added a subscriber: emaste.
emaste added inline comments.
usr.bin/wc/tests/wc_test.sh
159

maybe worth a comment demonstrating how the mb char crosses the boundary (to aid in someone updating this if the buffer increases in the future)?

This revision is now accepted and ready to land.Feb 15 2023, 11:59 PM

Parametrize MAXBSIZE, make sure we really do cross a buffer boundary, and explain what we're doing and why.

This revision now requires review to proceed.Feb 16 2023, 12:32 AM
des marked an inline comment as done.Feb 16 2023, 12:32 AM
This revision is now accepted and ready to land.Feb 16 2023, 12:39 AM
This revision was automatically updated to reflect the committed changes.