xref: /freebsd/bin/sh/tests/expansion/arith13.0 (revision d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf)
1*13de33a5SJulio Merino# Pre-increment and pre-decrement in arithmetic expansion are not in POSIX.
2*13de33a5SJulio Merino# Require either an error or a correct implementation.
3*13de33a5SJulio Merino
4*13de33a5SJulio Merino! (eval 'x=4; [ $((++x)) != 5 ] || [ $x != 5 ]') 2>/dev/null &&
5*13de33a5SJulio Merino! (eval 'x=2; [ $((--x)) != 1 ] || [ $x != 1 ]') 2>/dev/null
6