Skip to content

Commit faf10db

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 faf10db

File tree

3 files changed

+697
-983
lines changed

3 files changed

+697
-983
lines changed

.vscode/cspell.dictionaries/workspace.wordlist.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,22 @@ getcwd
364364
weblate
365365
algs
366366

367+
# * stty terminal flags
368+
brkint
369+
cstopb
370+
decctlq
371+
echoctl
372+
echoe
373+
echoke
374+
ignbrk
375+
ignpar
376+
icrnl
377+
isig
378+
istrip
379+
litout
380+
opost
381+
parodd
382+
367383
# translation tests
368384
CLICOLOR
369385
erreur

0 commit comments

Comments
 (0)