1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Move the test command body's trim() back into the TestScript class (to simplify Command-level code) but do it after double-verbose has had the chance to emit it as-is (so that debug output is not mangled by the trim).

FossilOrigin-Name: f15ecb68f7ca129478336b462508d2c40ea052b4040facefdbc67b13e6aea99d
This commit is contained in:
stephan
2023-08-09 17:04:58 +00:00
parent 583fc5b963
commit 5d2a618340
5 changed files with 15 additions and 11 deletions

View File

@ -572,7 +572,7 @@ class GlobCommand extends Command {
//t.verbose(argv[0]," SQL =\n",sql);
int rc = t.execSql(null, true, ResultBufferMode.ESCAPED,
ResultRowMode.ONELINE, sql);
final String result = t.getResultText().trim();
final String result = t.getResultText();
final String sArgs = Util.argvToString(argv);
//t.verbose(argv[0]," rc = ",rc," result buffer:\n", result,"\nargs:\n",sArgs);
final String glob = argv[1];

View File

@ -249,7 +249,10 @@ class TestScript {
}
outer.out("\n");
}
CommandDispatcher.dispatch(tester, chunk.argv, chunk.content);
CommandDispatcher.dispatch(
tester, chunk.argv,
(null==chunk.content) ? null : chunk.content.trim()
);
}
}
}

View File

@ -24,6 +24,7 @@ Also from the print command.
SELECT '{}', 'f';
SELECT '{ }', 'g';
SELECT '(a-b-c)', '[a-b-c]';
-- this comment must not cause an error
--result {a b} c d e "{}" f "{\011}" g (a-b-c) [a-b-c]
--testcase 2
SELECT 123