Skip to content

Commit 5fd36da

Browse files
committed
stty: Add essential unit tests and integration tests to improve coverage
- Added 11 essential unit tests for complex internal functions: * Control character parsing (string_to_control_char) * Control character formatting (control_char_to_string) * Combination settings expansion (combo_to_flags) * Terminal size parsing with overflow handling (parse_rows_cols) * Sane control character defaults (get_sane_control_char) - Added 16 integration tests for command behavior: * Help/version output validation * Invalid argument handling * Control character overflow validation * Grouped flag removal validation * File argument error handling * Conflicting print modes * TTY-dependent tests (marked as ignored for CI) Unit tests focus on complex parsing logic that's difficult to test via integration tests. Integration tests validate actual command behavior. Coverage improved from 0% to 43.76% (207/473 lines). Fixes #9061
1 parent 4c9058a commit 5fd36da

File tree

2 files changed

+656
-983
lines changed

2 files changed

+656
-983
lines changed

0 commit comments

Comments
 (0)