mirror of
https://github.com/fergalmoran/picard.git
synced 2025-12-24 02:09:56 +00:00
PICARD-2214: Fix exception if script ends with backslash
This commit is contained in:
@@ -1010,6 +1010,12 @@ class ScriptParserTest(PicardTestCase):
|
||||
def test_char_escape(self):
|
||||
self.assertScriptResultEquals(r"\n\t\$\%\(\)\,\\", "\n\t$%(),\\")
|
||||
|
||||
def test_char_escape_unexpected_char(self):
|
||||
self.assertRaises(ScriptSyntaxError, self.parser.eval, r'\x')
|
||||
|
||||
def test_char_escape_end_of_file(self):
|
||||
self.assertRaises(ScriptEndOfFile, self.parser.eval, 'foo\\')
|
||||
|
||||
def test_raise_unknown_function(self):
|
||||
self.assertRaises(ScriptUnknownFunction, self.parser.eval, '$unknownfn()')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user