本文整理匯總了Python中pygments.token.Name.Builtin方法的典型用法代碼示例。如果您正苦於以下問題:Python Name.Builtin方法的具體用法?Python Name.Builtin怎麽用?Python Name.Builtin使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類pygments.token.Name
的用法示例。
在下文中一共展示了Name.Builtin方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_unquoted_querystring
# 需要導入模塊: from pygments.token import Name [as 別名]
# 或者: from pygments.token.Name import Builtin [as 別名]
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, '`')
])
示例2: test_unquoted_bodystring
# 需要導入模塊: from pygments.token import Name [as 別名]
# 或者: from pygments.token.Name import Builtin [as 別名]
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, '`')
])
示例3: test_header_option_value
# 需要導入模塊: from pygments.token import Name [as 別名]
# 或者: from pygments.token.Name import Builtin [as 別名]
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, '`'),
])
示例4: test_httpie_body_param
# 需要導入模塊: from pygments.token import Name [as 別名]
# 或者: from pygments.token.Name import Builtin [as 別名]
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, '`'),
])