From: Collin Funk Date: Mon, 15 Jun 2026 05:50:50 +0000 (-0700) Subject: tests: test: test numeric operators with -l STRING X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;p=thirdparty%2Fcoreutils.git tests: test: test numeric operators with -l STRING * tests/test/test.pl (@Tests): Add a few test cases. --- diff --git a/tests/test/test.pl b/tests/test/test.pl index 1de18ba7eb..0f0a93d67b 100755 --- a/tests/test/test.pl +++ b/tests/test/test.pl @@ -162,18 +162,26 @@ my @Tests = ['eq-5', qw(1 -eq 0), {EXIT=>1}], ['eq-6', "$limits->{UINTMAX_OFLOW} -eq 0", {EXIT=>1}], ['eq-7', qw(0 -eq ' 0 ')], + ['eq-8', qw(-l abc -eq 3)], + ['eq-9', qw(-l abc -eq 2), {EXIT=>1}], ['gt-1', qw(5 -gt 5), {EXIT=>1}], ['gt-2', qw(5 -gt 4)], ['gt-3', qw(4 -gt 5), {EXIT=>1}], ['gt-4', qw(-1 -gt -2)], ['gt-5', "$limits->{UINTMAX_OFLOW} -gt $limits->{INTMAX_UFLOW}"], + ['gt-6', qw(-l abc -gt 3), {EXIT=>1}], + ['gt-7', qw(-l abc -gt 2)], + ['gt-8', qw(2 -gt -l abc), {EXIT=>1}], ['lt-1', qw(5 -lt 5), {EXIT=>1}], ['lt-2', qw(5 -lt 4), {EXIT=>1}], ['lt-3', qw(4 -lt 5)], ['lt-4', qw(-1 -lt -2), {EXIT=>1}], ['lt-5', "$limits->{INTMAX_UFLOW} -lt $limits->{UINTMAX_OFLOW}"], + ['lt-6', qw(-l abc -lt 3), {EXIT=>1}], + ['lt-7', qw(-l abc -lt 2), {EXIT=>1}], + ['lt-8', qw(2 -lt -l abc)], ['inv-1', qw(0x0 -eq 00), {EXIT=>2}, {ERR=>"$prog: invalid integer '0x0'\n"}],