Page MenuHomeFreeBSD

column(1): add tests
ClosedPublic

Authored by ivy on Apr 19 2025, 9:11 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jun 4, 9:08 PM
Unknown Object (File)
Tue, Jun 3, 2:17 AM
Unknown Object (File)
Mon, May 26, 3:30 AM
Unknown Object (File)
Sun, May 25, 1:33 PM
Unknown Object (File)
Thu, May 22, 7:18 PM
Unknown Object (File)
Tue, May 20, 10:00 PM
Unknown Object (File)
Sun, May 18, 7:50 PM
Unknown Object (File)
Sun, May 18, 6:51 AM
Subscribers

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ivy requested review of this revision.Apr 19 2025, 9:11 AM

you may notice this commit does not include tests for column -t. this is deliberate as i found a bug in column -t and plan to add a new feature, a bug fix, and a test as a follow-up commit.

des requested changes to this revision.Apr 19 2025, 10:33 AM
des added inline comments.
usr.bin/column/tests/column.sh
21

This should go in the test body, not in the head. The head is for setting ATF variables and such.

51
52

-s exit 0 is implied.

57

This is unnecessary. Each test is run in a separate temporary directory which is deleted after completion, regardless of outcome.

This revision now requires changes to proceed.Apr 19 2025, 10:33 AM
  • add test descriptions
  • don't remove files in cleanup
  • create test data in body, not head
  • remove -s exit:0 as it's redundant
  • use atf_check -o output:save instead of manual redirection
ivy marked 4 inline comments as done.Apr 20 2025, 8:05 PM

NB, i also removed a test line from the colonic_table test (the one with a single : and empty fields) because it currently fails, a fix for this bug will be part of a follow-up commit.

des requested changes to this revision.Apr 21 2025, 5:28 PM
des added inline comments.
usr.bin/column/Makefile
6

sorry I missed this

This revision now requires changes to proceed.Apr 21 2025, 5:28 PM
etc/mtree/BSD.tests.dist
1090

why did you drop this when you updated the patch?

usr.bin/column/Makefile
3

required for ${MK_TESTS} to be defined prior to including <bsd.prog.mk>

  • add src.opts.mk to Makefile
  • (re-)add new directory to mtree
ivy marked 3 inline comments as done.Apr 23 2025, 3:55 AM
ivy added inline comments.
etc/mtree/BSD.tests.dist
1090

i'm not sure what happened here but this wasn't deliberate. i think it went missing somehow when i split the original change into two diffs, but it should be back now.

This revision is now accepted and ready to land.May 7 2025, 8:36 AM
This revision was automatically updated to reflect the committed changes.
ivy marked an inline comment as done.