From 31c2c45214e21690aed55616ee9e10dafd56db1d Mon Sep 17 00:00:00 2001 From: WATANABE Yuki Date: Sun, 27 Oct 2024 22:50:51 +0900 Subject: [PATCH] tests/param-p: Test value of special parameter in subshell POSIX.1-2024 requires that the subshell inherit the value of $? from the parent. --- tests/param-p.tst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/param-p.tst b/tests/param-p.tst index 1a332a4a..c073dfad 100644 --- a/tests/param-p.tst +++ b/tests/param-p.tst @@ -430,10 +430,13 @@ echo $? echo $? (exit 123) echo $? +(exit 42) +(echo $?) __IN__ 0 1 123 +42 __OUT__ test_OE -e 0 'special parameter -' -eu