[packages/mksh] More tests

arekm arekm at pld-linux.org
Tue Sep 8 18:43:04 CEST 2026


commit d6a770abaa7db3ef1f2cd1105fee8125c40bccf7
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Tue Sep 8 18:42:43 2026 +0200

    More tests

 mksh-exit-trap-status.patch | 30 +++++++++++++++++++++++++++---
 1 file changed, 27 insertions(+), 3 deletions(-)
---
diff --git a/mksh-exit-trap-status.patch b/mksh-exit-trap-status.patch
index a34faa9..a66717b 100644
--- a/mksh-exit-trap-status.patch
+++ b/mksh-exit-trap-status.patch
@@ -1,7 +1,7 @@
 diff -urNp mksh-59c.org/check.t mksh-59c/check.t
 --- mksh-59c.org/check.t	2020-10-31 04:53:30.000000000 +0100
-+++ mksh-59c/check.t	2026-09-08 16:21:28.753672808 +0200
-@@ -8042,6 +8042,31 @@ expected-stderr:
++++ mksh-59c/check.t	2026-09-08 18:39:55.578780709 +0200
+@@ -8042,6 +8042,55 @@ expected-stderr:
  	subshell_exit
  	shell_exit
  ---
@@ -29,13 +29,37 @@ diff -urNp mksh-59c.org/check.t mksh-59c/check.t
 +expected-stdout:
 +	EXtrap
 +expected-exit: 5
++---
++name: exit-trap-6
++description:
++	Check that exit with an argument in the EXIT trap overrides
++	the status the trap was entered with
++stdin:
++	trap 'echo EXtrap; exit 7' EXIT
++	exit 9
++expected-stdout:
++	EXtrap
++expected-exit: 7
++---
++name: exit-trap-7
++description:
++	Check that exit with an argument in the EXIT trap overrides
++	the status the trap was entered with from another trap
++stdin:
++	trap 'exit 5' USR1
++	trap 'echo EXtrap; exit 7' EXIT
++	kill -USR1 $$
++	echo not reached
++expected-stdout:
++	EXtrap
++expected-exit: 7
 +---
  name: exit-trap-interactive
  description:
  	Check that interactive shell doesn't exit via EXIT trap on syntax error
 diff -urNp mksh-59c.org/main.c mksh-59c/main.c
 --- mksh-59c.org/main.c	2020-10-01 22:29:21.000000000 +0200
-+++ mksh-59c/main.c	2026-09-08 16:21:20.628320872 +0200
++++ mksh-59c/main.c	2026-09-08 18:40:02.340513452 +0200
 @@ -977,9 +977,18 @@ unwind(int i)
  	if (i == LEXIT || ((i == LERROR || i == LERREXT || i == LINTR) &&
  	    sigtraps[ksh_SIGEXIT].trap &&
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mksh.git/commitdiff/d6a770abaa7db3ef1f2cd1105fee8125c40bccf7



More information about the pld-cvs-commit mailing list