Skip to content

Commit

Permalink
tests/param-p: Test value of special parameter in subshell
Browse files Browse the repository at this point in the history
POSIX.1-2024 requires that the subshell inherit the value of $? from the
parent.
  • Loading branch information
magicant committed Oct 27, 2024
1 parent a57e686 commit 31c2c45
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/param-p.tst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 31c2c45

Please sign in to comment.