本文整理汇总了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, '`'),
])