From fbf06de861905db06ebe1b5725fc287909907677 Mon Sep 17 00:00:00 2001 From: delphij Date: Sun, 27 Feb 2011 12:28:06 +0000 Subject: 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 --- bin/test/test.c | 1 + tools/regression/bin/test/regress.sh | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/test/test.c b/bin/test/test.c index 0d0ad65..1259e68 100644 --- a/bin/test/test.c +++ b/bin/test/test.c @@ -144,6 +144,7 @@ struct t_op { {"-L", FILSYM, UNOP}, {"-S", FILSOCK,UNOP}, {"=", STREQ, BINOP}, + {"==", STREQ, BINOP}, {"!=", STRNE, BINOP}, {"<", STRLT, BINOP}, {">", STRGT, BINOP}, diff --git a/tools/regression/bin/test/regress.sh b/tools/regression/bin/test/regress.sh index 716c260..dfe80a5 100644 --- a/tools/regression/bin/test/regress.sh +++ b/tools/regression/bin/test/regress.sh @@ -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' -- cgit v1.1