示例#1
0
文件: tests.py 项目: iiSeymour/sedpy
 def tokenize(self, script):
     """
     Return the token array for a given script
     """
     sed = Sed(script, quiet=True)
     return sed.tokens
示例#2
0
文件: tests.py 项目: iiSeymour/sedpy
 def runfiletest(self, script, strings, expected):
     """
     Run a script on a list of strings, returns the output and expected output
     """
     sed = Sed(script, quiet=True)
     return [sed.parse(string) for string in strings], expected
示例#3
0
文件: tests.py 项目: iiSeymour/sedpy
 def runfiletest(self, script, strings, expected):
     """
     Run a script on a list of strings, returns the output and expected output
     """
     sed = Sed(script, quiet=True)
     return [sed.parse(string) for string in strings], expected
示例#4
0
文件: tests.py 项目: iiSeymour/sedpy
 def runtest(self, script, string, expected):
     """
     Run a script on a string, returns the output and expected ouput
     """
     sed = Sed(script, quiet=True)
     return sed.parse(string), expected
示例#5
0
文件: tests.py 项目: iiSeymour/sedpy
 def runtest(self, script, string, expected):
     """
     Run a script on a string, returns the output and expected ouput
     """
     sed = Sed(script, quiet=True)
     return sed.parse(string), expected