aboutsummaryrefslogtreecommitdiff
path: root/tests/functional
diff options
context:
space:
mode:
authorRebecca Turner <rbt@sent.as>2024-04-06 14:39:01 -0700
committerRebecca Turner <rbt@sent.as>2024-04-08 11:14:34 -0700
commit4a49a497eb39fbdedefc518c6d61c9a426641506 (patch)
tree97dd11da007d679836388515301896b54af4de0c /tests/functional
parentb3233405381b50c7f7eb87d7962b25a06d16be44 (diff)
Fix REPL test parser nits
Follow-up to https://gerrit.lix.systems/c/lix/+/546 Change-Id: Ie603f01e5520329bf879e061cea9e3fba45213fd
Diffstat (limited to 'tests/functional')
-rw-r--r--tests/functional/repl_characterization/repl_characterization.cc5
-rw-r--r--tests/functional/repl_characterization/test-session.cc4
-rw-r--r--tests/functional/repl_characterization/test-session.hh2
3 files changed, 3 insertions, 8 deletions
diff --git a/tests/functional/repl_characterization/repl_characterization.cc b/tests/functional/repl_characterization/repl_characterization.cc
index ae4d4030f..eb90f349d 100644
--- a/tests/functional/repl_characterization/repl_characterization.cc
+++ b/tests/functional/repl_characterization/repl_characterization.cc
@@ -123,11 +123,6 @@ public:
{
runReplTestPath(nameBase, {});
}
-
- void runDebuggerTest(const std::string_view & nameBase)
- {
- runReplTestPath(nameBase, {"--debugger"});
- }
};
TEST_F(ReplSessionTest, round_trip)
diff --git a/tests/functional/repl_characterization/test-session.cc b/tests/functional/repl_characterization/test-session.cc
index 52179a372..c3eb45b85 100644
--- a/tests/functional/repl_characterization/test-session.cc
+++ b/tests/functional/repl_characterization/test-session.cc
@@ -121,7 +121,7 @@ bool TestSession::readOutThen(ReadOutThenCallback cb)
bool TestSession::waitForPrompt()
{
- bool notEof = readOutThen([&](std::span<char> s) -> ReadOutThenCallbackResult {
+ bool notEof = readOutThen([&](std::span<const char> s) -> ReadOutThenCallbackResult {
bool foundPrompt = false;
for (auto ch : s) {
@@ -147,7 +147,7 @@ bool TestSession::waitForPrompt()
void TestSession::wait()
{
- readOutThen([&](std::span<char> s) {
+ readOutThen([&](std::span<const char> s) {
for (auto ch : s) {
eater.feed(ch, [&](char c) {
outputParser.feed(c);
diff --git a/tests/functional/repl_characterization/test-session.hh b/tests/functional/repl_characterization/test-session.hh
index 2552542fb..9961849fc 100644
--- a/tests/functional/repl_characterization/test-session.hh
+++ b/tests/functional/repl_characterization/test-session.hh
@@ -76,7 +76,7 @@ private:
void wait();
enum class ReadOutThenCallbackResult { Stop, Continue };
- using ReadOutThenCallback = std::function<ReadOutThenCallbackResult(std::span<char>)>;
+ using ReadOutThenCallback = std::function<ReadOutThenCallbackResult(std::span<const char>)>;
/** Reads some chunks of output, calling the callback provided for each
* chunk and stopping if it returns Stop.
*