tests/test-contrib-check-code.t
changeset 33721 24849d53697d
parent 32293 ca727147ff9f
child 34384 b52f22d9afa5
equal deleted inserted replaced
33720:27fb986e54d0 33721:24849d53697d
   211    >     .. note::
   211    >     .. note::
   212    warning: add two newlines after '.. note::'
   212    warning: add two newlines after '.. note::'
   213   [1]
   213   [1]
   214 
   214 
   215   $ cat > ./map-inside-gettext.py <<EOF
   215   $ cat > ./map-inside-gettext.py <<EOF
   216   > print _("map inside gettext %s" % v)
   216   > print(_("map inside gettext %s" % v))
   217   > 
   217   > 
   218   > print _("concatenating " " by " " space %s" % v)
   218   > print(_("concatenating " " by " " space %s" % v))
   219   > print _("concatenating " + " by " + " '+' %s" % v)
   219   > print(_("concatenating " + " by " + " '+' %s" % v))
   220   > 
   220   > 
   221   > print _("mapping operation in different line %s"
   221   > print(_("mapping operation in different line %s"
   222   >         % v)
   222   >         % v))
   223   > 
   223   > 
   224   > print _(
   224   > print(_(
   225   >         "leading spaces inside of '(' %s" % v)
   225   >         "leading spaces inside of '(' %s" % v))
   226   > EOF
   226   > EOF
   227   $ "$check_code" ./map-inside-gettext.py
   227   $ "$check_code" ./map-inside-gettext.py
   228   ./map-inside-gettext.py:1:
   228   ./map-inside-gettext.py:1:
   229    > print _("map inside gettext %s" % v)
   229    > print(_("map inside gettext %s" % v))
   230    don't use % inside _()
   230    don't use % inside _()
   231   ./map-inside-gettext.py:3:
   231   ./map-inside-gettext.py:3:
   232    > print _("concatenating " " by " " space %s" % v)
   232    > print(_("concatenating " " by " " space %s" % v))
   233    don't use % inside _()
   233    don't use % inside _()
   234   ./map-inside-gettext.py:4:
   234   ./map-inside-gettext.py:4:
   235    > print _("concatenating " + " by " + " '+' %s" % v)
   235    > print(_("concatenating " + " by " + " '+' %s" % v))
   236    don't use % inside _()
   236    don't use % inside _()
   237   ./map-inside-gettext.py:6:
   237   ./map-inside-gettext.py:6:
   238    > print _("mapping operation in different line %s"
   238    > print(_("mapping operation in different line %s"
   239    don't use % inside _()
   239    don't use % inside _()
   240   ./map-inside-gettext.py:9:
   240   ./map-inside-gettext.py:9:
   241    > print _(
   241    > print(_(
   242    don't use % inside _()
   242    don't use % inside _()
   243   [1]
   243   [1]
   244 
   244 
   245 web templates
   245 web templates
   246 
   246