1 2failures=0 3 4for x in \ 5 0x10000000000000000 \ 6 -0x8000000000000001 \ 7 0xfffffffffffffffffffffffffffffffff \ 8 -0xfffffffffffffffffffffffffffffffff \ 9 02000000000000000000000 \ 10 9223372036854775808 \ 11 9223372036854775809 \ 12 -9223372036854775809 \ 13 9999999999999999999999999 \ 14 -9999999999999999999999999 15do 16 msg=$({ 17 v=$((x)) || : 18 } 3>&1 >&2 2>&3 3>&-) 19 r=$? 20 if [ "$r" = 0 ] || [ -z "$msg" ]; then 21 printf 'Failed: %s\n' "$x" 22 : $((failures += 1)) 23 fi 24done 25exit $((failures > 0)) 26