diff options
| author | Jilles Tjoelker <jilles@FreeBSD.org> | 2019-02-10 22:23:05 +0000 |
|---|---|---|
| committer | Jilles Tjoelker <jilles@FreeBSD.org> | 2019-02-10 22:23:05 +0000 |
| commit | aac5464b6108116bc4172b47f54854f6f85c7a64 (patch) | |
| tree | 1151ffbe371a28cf932a79a8fa5e1934769b5385 /bin/sh/tests | |
| parent | 2a0f9d54162cfb8dbf1cd4cc5dd59aaa9f98a08e (diff) | |
Notes
Diffstat (limited to 'bin/sh/tests')
| -rw-r--r-- | bin/sh/tests/expansion/Makefile | 2 | ||||
| -rw-r--r-- | bin/sh/tests/expansion/arith16.0 | 26 | ||||
| -rw-r--r-- | bin/sh/tests/expansion/arith17.0 | 3 |
3 files changed, 31 insertions, 0 deletions
diff --git a/bin/sh/tests/expansion/Makefile b/bin/sh/tests/expansion/Makefile index 25cf218f40a2..58df967304f5 100644 --- a/bin/sh/tests/expansion/Makefile +++ b/bin/sh/tests/expansion/Makefile @@ -22,6 +22,8 @@ ${PACKAGE}FILES+= arith12.0 ${PACKAGE}FILES+= arith13.0 ${PACKAGE}FILES+= arith14.0 ${PACKAGE}FILES+= arith15.0 +${PACKAGE}FILES+= arith16.0 +${PACKAGE}FILES+= arith17.0 ${PACKAGE}FILES+= assign1.0 ${PACKAGE}FILES+= cmdsubst1.0 ${PACKAGE}FILES+= cmdsubst2.0 diff --git a/bin/sh/tests/expansion/arith16.0 b/bin/sh/tests/expansion/arith16.0 new file mode 100644 index 000000000000..b764e3c216f8 --- /dev/null +++ b/bin/sh/tests/expansion/arith16.0 @@ -0,0 +1,26 @@ +# $FreeBSD$ + +failures=0 + +for x in \ + 0x10000000000000000 \ + -0x8000000000000001 \ + 0xfffffffffffffffffffffffffffffffff \ + -0xfffffffffffffffffffffffffffffffff \ + 02000000000000000000000 \ + 9223372036854775808 \ + 9223372036854775809 \ + -9223372036854775809 \ + 9999999999999999999999999 \ + -9999999999999999999999999 +do + msg=$({ + v=$((x)) || : + } 3>&1 >&2 2>&3 3>&-) + r=$? + if [ "$r" = 0 ] || [ -z "$msg" ]; then + printf 'Failed: %s\n' "$x" + : $((failures += 1)) + fi +done +exit $((failures > 0)) diff --git a/bin/sh/tests/expansion/arith17.0 b/bin/sh/tests/expansion/arith17.0 new file mode 100644 index 000000000000..0a9260886ddb --- /dev/null +++ b/bin/sh/tests/expansion/arith17.0 @@ -0,0 +1,3 @@ +# $FreeBSD$ + +[ $((9223372036854775809)) -gt 0 ] |
