diff options
author | delphij <delphij@FreeBSD.org> | 2011-02-27 12:28:06 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2011-02-27 12:28:06 +0000 |
commit | fbf06de861905db06ebe1b5725fc287909907677 (patch) | |
tree | 3cdd43ec1d802c80450559083e70ad13d186e9d6 | |
parent | 1903daf0a4e7d5991b5a9396b74e51ce39add811 (diff) | |
download | FreeBSD-src-fbf06de861905db06ebe1b5725fc287909907677.zip FreeBSD-src-fbf06de861905db06ebe1b5725fc287909907677.tar.gz |
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
-rw-r--r-- | bin/test/test.c | 1 | ||||
-rw-r--r-- | tools/regression/bin/test/regress.sh | 5 |
2 files changed, 5 insertions, 1 deletions
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' |