feat(xce-test-rc-file): task 2.2 wire rc-file loading into xce_test startup
Adds the integration call site in main(), between g_continue_on_error's computation and the read loop: unless --norc is given, resolve the rc-file path and load it through preprocess_and_run (the same command-execution path used for typed/piped input). A NULL path (no XDG/HOME) or missing file falls through silently to the read loop. A failing rc-file command under scripted/piped abort-on-first-failure mode short-circuits straight to the existing g_session_failed exit-code convention, never entering the read loop -- so a piped script's own commands never run after an rc-file failure. Verified end-to-end against the built binary, including a real pty for the interactive path, in both the failure and success cases. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AgYRU3zDTqNGV5Jk8aiKLg
This commit is contained in:
parent
68fcd657d6
commit
e863d69993
2 changed files with 24 additions and 1 deletions
|
|
@ -24,7 +24,7 @@
|
|||
- _Requirements: 2.1, 2.2_
|
||||
- _Boundary: test.c::options[]/parse_opt_
|
||||
|
||||
- [ ] 2.2 Wire rc-file loading into xce_test startup for both interactive and scripted sessions
|
||||
- [x] 2.2 Wire rc-file loading into xce_test startup for both interactive and scripted sessions
|
||||
- After xce_test determines whether the session is interactive or scripted and before it reads the first line of its normal session, resolve and load the rc file unless the skip flag was given, using the session's existing command-execution path as the per-line runner
|
||||
- When rc-file loading signals a stop, exit using the session's existing pass/fail exit-code convention without entering the normal session loop
|
||||
- Observable: a valid rc file's settings/context are visible once the normal session begins, in both a piped run and an interactive run; the same is confirmed absent when the skip flag is given
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue