Commits

Olemis Lang committed 781714c

GViz QL [ refs dataviz-302 ] : Check for unsupported format syntax ID ... ok

  • Participants
  • Parent commits 53d28af

Comments (0)

Files changed (1)

File trac-dev/gviz/tracgviz/testing/test_gvizql.py

       GVizIllegalPattern  :  Bad syntax in format_syntax option at 26
 
 
+      >>> parse("select * options no_values, format_syntax:'salary:XXX' "
+      ...       "format salary 'SPELLOUT'", 'opts', 'cols', 'fmt')
+      *****
+      * Tokens
+      *****
+      Token.Keyword.Reserved select
+      Token.Name.Other *
+      Token.Keyword.Reserved options
+      Token.Name.Variable no_values
+      Token.Punctuation ,
+      Token.Name.Variable format_syntax
+      Token.Punctuation :
+      Token.Literal.String.Single 'salary:XXX'
+      Token.Keyword.Reserved format
+      Token.Name.Variable salary
+      Token.Literal.String.Single 'SPELLOUT'
+      *****
+      * Parsing
+      *****
+      [('no_values', None), (u'format_syntax', 'salary:XXX')]
+      None
+      [('salary', 'SPELLOUT')]
+      *****
+      * Result
+      *****
+      GVizIllegalPattern  :  Unsupported formatting syntax XXX
+
       """,
     'Parsing (failures)' : r"""
       >>> parse("  select ", 'cols', fail=True)