From 3f31ec950b78309a0d12d92d87a735b8870a2289 Mon Sep 17 00:00:00 2001 From: "David A. Wheeler" Date: Tue, 22 Mar 2011 06:03:55 +0100 Subject: test: accept "==" as a synonym for "=" Make GNU coreutils' test recognize "==" as a synonym for "=". This is already the case in GNU coreutils' expr, bash, ksh, busybox ash, FreeBSD-current /bin/sh and /bin/test, and OpenBSD's /bin/sh. Before, env test a '==' a would fail with this diagnostic: "test: ==: binary operator expected". Now, it succeeds. * src/test.c: Accept "==" as a synonym for "=". * doc/coreutils.texi (String tests): Document it. Reported as http://debbugs.gnu.org/8263 Also see http://austingroupbugs.net/view.php?id=375 --- doc/coreutils.texi | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'doc/coreutils.texi') diff --git a/doc/coreutils.texi b/doc/coreutils.texi index 8dd1ed8ba..46deeed46 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -11535,7 +11535,7 @@ Exit status: * File type tests:: -[bcdfhLpSt] * Access permission tests:: -[gkruwxOG] * File characteristic tests:: -e -s -nt -ot -ef -* String tests:: -z -n = != +* String tests:: -z -n = == != * Numeric tests:: -eq -ne -lt -le -gt -ge * Connectives for test:: ! -a -o @end menu @@ -11726,6 +11726,11 @@ True if the length of @var{string} is nonzero. @cindex equal string check True if the strings are equal. +@item @var{string1} == @var{string2} +@opindex == +@cindex equal string check +True if the strings are equal (synonym for =). + @item @var{string1} != @var{string2} @opindex != @cindex not-equal string check -- cgit v1.2.3-70-g09d2