diff tests/test-contrib-check-code.t @ 32333:ca727147ff9f

style: ban [ foo == bar] bashism in tests
author Augie Fackler <augie@google.com>
date Mon, 15 May 2017 14:08:02 -0400
parents 2a54cf92c773
children 24849d53697d
line wrap: on
line diff
--- a/tests/test-contrib-check-code.t	Sat May 13 16:26:43 2017 -0700
+++ b/tests/test-contrib-check-code.t	Mon May 15 14:08:02 2017 -0400
@@ -152,6 +152,15 @@
    >   $ function onwarn {}
    warning: don't use 'function', use old style
   [1]
+  $ cat > error.t <<EOF
+  >   $ [ foo == bar ]
+  > EOF
+  $ "$check_code" error.t
+  error.t:1:
+   >   $ [ foo == bar ]
+   [ foo == bar ] is a bashism, use [ foo = bar ] instead
+  [1]
+  $ rm error.t
   $ cat > raise-format.py <<EOF
   > raise SomeException, message
   > # this next line is okay