Ejemplo n.º 1
0
 def tokenize(self, script):
     """
     Return the token array for a given script
     """
     sed = Sed(script, quiet=True)
     return sed.tokens
Ejemplo n.º 2
0
 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
Ejemplo n.º 3
0
 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
Ejemplo n.º 4
0
 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
Ejemplo n.º 5
0
 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