From 49e01565b90dea775712a7c8aa962eda0a6ec72c Mon Sep 17 00:00:00 2001 From: Thomas von Dein Date: Fri, 8 Dec 2023 18:37:35 +0100 Subject: [PATCH] catch exec errors --- t/cmdline-invalidcommand.txtar | 2 +- t/cmdline-short-stack.txtar | 2 +- t/cmdlinecalc-divzero.txtar | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/t/cmdline-invalidcommand.txtar b/t/cmdline-invalidcommand.txtar index f30dbe4..f1c0949 100644 --- a/t/cmdline-invalidcommand.txtar +++ b/t/cmdline-invalidcommand.txtar @@ -1,2 +1,2 @@ -exec testrpn 1 2 dumb +! exec testrpn 1 2 dumb stdout 'unknown command or operator' diff --git a/t/cmdline-short-stack.txtar b/t/cmdline-short-stack.txtar index f3ce466..30ac14f 100644 --- a/t/cmdline-short-stack.txtar +++ b/t/cmdline-short-stack.txtar @@ -1,2 +1,2 @@ -exec testrpn 4 + +! exec testrpn 4 + stdout 'stack doesn''t provide enough arguments' diff --git a/t/cmdlinecalc-divzero.txtar b/t/cmdlinecalc-divzero.txtar index 411c636..bc32f83 100644 --- a/t/cmdlinecalc-divzero.txtar +++ b/t/cmdlinecalc-divzero.txtar @@ -1,2 +1,2 @@ -exec testrpn 100 50 50 - / -stdout 'division by null\n' +! exec testrpn 100 50 50 - / +stdout 'division by null'