mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2025-09-10 07:59:52 +02:00
test: add string operators added by POSIX 2024
* src/test.c (binop): Recognize the ">" and "<" operators. (three_arguments): Likewise. (binary_operator): Implement the "<" and ">" operators. (usage): Add operators to --help output. * tests/test/test.pl (@Tests): Add functionality tests. * doc/coreutils.texi (test invocation, String tests): Document new operators. * NEWS: Mention the new feature.
This commit is contained in:
committed by
Pádraig Brady
parent
f48123ef27
commit
ee231019e1
@@ -13733,7 +13733,7 @@ Exit status:
|
||||
* File type tests:: @code{-[bcdfhLpSt]}
|
||||
* Access permission tests:: @code{-[gkruwxOG]}
|
||||
* File characteristic tests:: @code{-e -s -nt -ot -ef}
|
||||
* String tests:: @code{-z -n = == !=}
|
||||
* String tests:: @code{-z -n = == != > <}
|
||||
* Numeric tests:: @code{-eq -ne -lt -le -gt -ge}
|
||||
* Connectives for test:: @code{! -a -o}
|
||||
@end menu
|
||||
@@ -13942,6 +13942,16 @@ shells and systems.
|
||||
@cindex not-equal string check
|
||||
True if the strings are not equal.
|
||||
|
||||
@item @var{string1} > @var{string2}
|
||||
@opindex >
|
||||
@cindex greater-than string check
|
||||
True if @var{string1} is greater than @var{string2} in the current locale.
|
||||
|
||||
@item @var{string1} < @var{string2}
|
||||
@opindex <
|
||||
@cindex less-than string check
|
||||
True if @var{string1} is less than @var{string2} in the current locale.
|
||||
|
||||
@end table
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user