3
0

expr-big 458 B

12345678910111213141516
  1. # busybox expr
  2. # 3*1000*1000*1000 overflows 32-bit signed int
  3. res=`busybox expr 0 '<' 3000000000`
  4. [ x"$res" = x1 ] || exit 1
  5. # 9223372036854775807 = 2^31-1
  6. res=`busybox expr 0 '<' 9223372036854775807`
  7. [ x"$res" = x1 ] || exit 1
  8. # coreutils fails this one!
  9. res=`busybox expr -9223372036854775800 '<' 9223372036854775807`
  10. [ x"$res" = x1 ] || exit 1
  11. # This one works only by chance
  12. # res=`busybox expr 0 '<' 9223372036854775808`
  13. # [ x"$res" = x1 ] || exit 1