Skip to content

Process the final file-session command without a trailing newline - #252

Open
dajiaohuang wants to merge 1 commit into
daniele77:masterfrom
dajiaohuang:fix/file-session-final-line-20261016
Open

dajiaohuang wants to merge 1 commit into
daniele77:masterfrom
dajiaohuang:fix/file-session-final-line-20261016

Conversation

@dajiaohuang

Copy link
Copy Markdown

Problem

A supported CliFileSession input stream containing add 2 3 without a final newline silently drops that command. getline successfully extracts the line and sets eofbit, but Start() tests eofbit instead of the extraction result.

Change

Feed each successfully extracted line, and exit when extraction fails. Add a public-session regression covering both terminated and unterminated final commands.

Validation

  • Regression fails on master 769c5fa and passes after the change.
  • 33 existing/new Boost.Test cases passed using the header-only test runner on Ubuntu 24.04 / GCC 13 / C++14; standalone-Asio scheduler tests were excluded because standalone Asio is unavailable, and the packaged Boost.Test library is unavailable.
  • Public stream fixture: quoted parameters, nested commands, explicit exit, and both final-line forms.
  • Full upstream platform/CI matrix not run locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant