Accept == as an alias of = which is a popular GNU extension.

This is intentionally undocumented for now since it's not part
of any standard.

MFC after:	1 month
This commit is contained in:
Xin LI 2011-02-27 12:28:06 +00:00
parent b3f3e1cb6a
commit eaea8924ce
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=219084
2 changed files with 5 additions and 1 deletions

View File

@ -144,6 +144,7 @@ struct t_op {
{"-L", FILSYM, UNOP},
{"-S", FILSOCK,UNOP},
{"=", STREQ, BINOP},
{"==", STREQ, BINOP},
{"!=", STRNE, BINOP},
{"<", STRLT, BINOP},
{">", STRGT, BINOP},

View File

@ -52,12 +52,15 @@ t ()
}
count=0
echo "1..94"
echo "1..97"
t 0 'b = b'
t 0 'b == b'
t 1 'b != b'
t 0 '\( b = b \)'
t 0 '\( b == b \)'
t 1 '! \( b = b \)'
t 1 '! \( b == b \)'
t 1 '! -f /etc/passwd'
t 0 '-h = -h'