The test builtin fails silently on negative values
Created by: xTibor
This might trip some users coming from GNU. The GNU implementation supports comparisons with signed values while Ion's test
only supports unsigned values and fails silently on signed ones.
Reproduction:
test "-100" -eq "200" && echo true || echo false
test "-100" -ne "200" && echo true || echo false
test "-100" -gt "200" && echo true || echo false
test "-100" -lt "200" && echo true || echo false
Expected behavior:
false
true
false
true
Actual behavior:
true
true
true
true
Build information:
rustc -V
: rustc 1.23.0-nightly (d6b06c63a 2017-11-09)
git rev-parse HEAD
: 2f176ebe
System: KDE neon 5.11 (Ubuntu 16.04 LTS)