Welcome to mirror list, hosted at ThFree Co, Russian Federation.

expr-big « expr « testsuite - git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 23dbbb3c8a9ab7f1e4fd49ccd21c16d0ea86f32c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# busybox expr

# 3*1000*1000*1000 overflows 32-bit signed int
res=`busybox expr 0 '<' 3000000000`
[ x"$res" = x1 ] || exit 1

# 9223372036854775807 = 2^31-1
res=`busybox expr 0 '<' 9223372036854775807`
[ x"$res" = x1 ] || exit 1
# coreutils fails this one!
res=`busybox expr -9223372036854775800 '<' 9223372036854775807`
[ x"$res" = x1 ] || exit 1

# This one works only by chance
# res=`busybox expr 0 '<' 9223372036854775808`
# [ x"$res" = x1 ] || exit 1