OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-cogserver commits / b964d04

Adjust message sizes for printf.
Apparently, using `echo` sent the newline, and then echo itself appended one more newline, resulting in two being sent, and thus two prompts being received. The colorized guile> prompt is exactly 25 bytes long. The messages are now 25 bytes shorter.
b964d04f7817a09911e09ba5ceef6cdcbe7a35e9
by Linas Vepštas <linasvepstas@gmail.com> · 2025-12-17T08:22:26.000Z

Changed files (1) +5 -3

tests/shell/ShellUTest.cxxtest +5 -3
……@@ -81,7 +81,8 @@ void gargleblast(int tid, int reps)
8181
8282// #define CUR_MSG_SZ 235 // Size without blank spaces.
8383// #define CUR_MSG_SZ 264 // Size without synchronous idle.
84#define CUR_MSG_SZ 248 // Size without 'Node", 'Link' suffixes.
84// #define CUR_MSG_SZ 248 // Size without 'Node", 'Link' suffixes.
85#define CUR_MSG_SZ 223 // Size without extra colorized `guile>`
8586 // size_t msgsz = reso.size();
8687 size_t msgsz = nch;
8788 TS_ASSERT_LESS_THAN_EQUALS(CUR_MSG_SZ, msgsz);
……@@ -104,8 +105,9 @@ void gargleblast(int tid, int reps)
104105 // if (' ' != delo[i]) nch++;
105106 if (0x16 != delo[i]) nch++;
106107
107#define CUR_DEL_SZ 178 // Size without synchronous idle
108// #define CUR_DEL_SZ 160 // Size without blank spaces
108// #define CUR_DEL_SZ 160 // Size without blank spaces
109// #define CUR_DEL_SZ 178 // Size without synchronous idle
110#define CUR_DEL_SZ 153 // Size without extra colorized `guile>`
109111 // size_t msgsz = delo.size();
110112 size_t msgsz = nch;
111113 TS_ASSERT_LESS_THAN_EQUALS(CUR_DEL_SZ, msgsz);