xref: /dflybsd-src/tools/regression/bin/sh/expansion/arith13.0 (revision 3e3895bf4584c1562faf4533cbd97026ee6a8dcf)
1*3e3895bfSKrzysztof Piecuch# $FreeBSD: head/bin/sh/tests/expansion/arith13.0 254806 2013-08-24 20:06:00Z jilles $
2*3e3895bfSKrzysztof Piecuch# Pre-increment and pre-decrement in arithmetic expansion are not in POSIX.
3*3e3895bfSKrzysztof Piecuch# Require either an error or a correct implementation.
4*3e3895bfSKrzysztof Piecuch
5*3e3895bfSKrzysztof Piecuch! (eval 'x=4; [ $((++x)) != 5 ] || [ $x != 5 ]') 2>/dev/null &&
6*3e3895bfSKrzysztof Piecuch! (eval 'x=2; [ $((--x)) != 1 ] || [ $x != 1 ]') 2>/dev/null
7