aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2024-11-07 00:02:27 +0300
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2024-11-07 00:02:27 +0300
commit6747f318f50760d7a3a773e894df3d3ed449e5d7 (patch)
treec7168afc54b19d5f788d72700892b9d6e1fcba34 /src
parent5f141848b88237959bd01603b427b792828d73ad (diff)
downloadsciteco-6747f318f50760d7a3a773e894df3d3ed449e5d7.tar.gz
test suite: fixed failure detection in the commandline-editing test cases
* The program exit code will usually not signal failures since they are caught earlier. * Therefore, we always have to capture and check stderr.
Diffstat (limited to 'src')
-rw-r--r--src/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index d561d33..892f15c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -457,6 +457,10 @@ main(int argc, char **argv)
teco_machine_main_init(&teco_cmdline.machine, &local_qregs, TRUE);
if (G_UNLIKELY(teco_fake_cmdline != NULL)) {
+ /*
+ * NOTE: Most errors are already catched at a higher level,
+ * so you cannot rely on the exit code to detect them.
+ */
if (!teco_cmdline_keypress(teco_fake_cmdline, strlen(teco_fake_cmdline), &error) &&
!g_error_matches(error, TECO_ERROR, TECO_ERROR_QUIT)) {
teco_error_add_frame_toplevel();