Page MenuHomeFreeBSD

wc: Improve test coverage.
ClosedPublic

Authored by des on Feb 15 2023, 1:11 PM.
Tags
None
Referenced Files
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
Unknown Object (File)
Jan 18 2024, 6:17 PM
Unknown Object (File)
Jan 6 2024, 6:03 PM
Unknown Object (File)
Dec 20 2023, 8:37 AM
Unknown Object (File)
Dec 9 2023, 9: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 Not Applicable
Unit
Tests Not Applicable

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
164

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.