diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2024-11-07 00:02:27 +0300 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2024-11-07 00:02:27 +0300 |
commit | 6747f318f50760d7a3a773e894df3d3ed449e5d7 (patch) | |
tree | c7168afc54b19d5f788d72700892b9d6e1fcba34 /src | |
parent | 5f141848b88237959bd01603b427b792828d73ad (diff) | |
download | sciteco-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.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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(); |