Skip to content

Commit 1838e5b

Browse files
committed
stty: Add 101 unit tests and 16 integration tests to improve coverage
Add comprehensive test coverage for stty: Unit tests (src/uu/stty/src/stty.rs): - Flag struct methods and builder pattern (7 tests) - Control character parsing and formatting (19 tests) - All combination settings expansion (26 tests) - Termios modification functions (13 tests) - String-to-flag/combo/baud parsing (19 tests) - TermiosFlag trait implementations (5 tests) - Helper and utility functions (10 tests) - Trait implementations (2 tests) Integration tests (tests/by-util/test_stty.rs): - Help and version output validation (2 tests) - Invalid argument handling (3 tests) - Control character overflow validation (2 tests) - Grouped flag removal validation (1 test) - File argument error handling (1 test) - Conflicting print modes (1 test) - Additional TTY-dependent tests (6 tests, ignored in CI) Unit test coverage improved from 0% to 43.76% (207/473 lines). Integration tests validate argument parsing and error handling. Addresses #9061
1 parent 95b266f commit 1838e5b

File tree

2 files changed

+1198
-0
lines changed

2 files changed

+1198
-0
lines changed

0 commit comments

Comments
 (0)