Python pygments.token.Name.Builtin() Examples
The following are 4
code examples of pygments.token.Name.Builtin().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
pygments.token.Name
, or try the search function
.
Example #1
Source File: test_lexer.py From http-prompt with MIT License | 6 votes |
def test_unquoted_querystring(self): self.assertEqual(self.get_tokens('`echo name`==john'), [ (Text, '`'), (Name.Builtin, 'echo'), (Text, 'name'), (Text, '`'), (Operator, '=='), (String, 'john') ]) self.assertEqual(self.get_tokens('name==`echo john`'), [ (Name, 'name'), (Operator, '=='), (Text, '`'), (Name.Builtin, 'echo'), (Text, 'john'), (Text, '`') ])
Example #2
Source File: test_lexer.py From http-prompt with MIT License | 6 votes |
def test_unquoted_bodystring(self): self.assertEqual(self.get_tokens('`echo name`=john'), [ (Text, '`'), (Name.Builtin, 'echo'), (Text, 'name'), (Text, '`'), (Operator, '='), (String, 'john') ]) self.assertEqual(self.get_tokens('name=`echo john`'), [ (Name, 'name'), (Operator, '='), (Text, '`'), (Name.Builtin, 'echo'), (Text, 'john'), (Text, '`') ])
Example #3
Source File: test_lexer.py From http-prompt with MIT License | 5 votes |
def test_header_option_value(self): self.assertEqual(self.get_tokens('Accept:`echo "application/json"`'), [ (Name, 'Accept'), (Operator, ':'), (Text, '`'), (Name.Builtin, 'echo'), (String.Double, '"application/json"'), (Text, '`'), ])
Example #4
Source File: test_lexer.py From http-prompt with MIT License | 5 votes |
def test_httpie_body_param(self): self.assertEqual(self.get_tokens('httpie post name=`echo john`'), [ (Keyword, 'httpie'), (Keyword, 'post'), (Name, 'name'), (Operator, '='), (Text, '`'), (Name.Builtin, 'echo'), (Text, 'john'), (Text, '`'), ])