From cb4348df612e76cc3fbf65081170dd64bd38ecd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Wed, 11 Apr 2018 23:02:02 +0200 Subject: [PATCH] tests: fix AST return in Perl --- tests/scripts/python/unparse.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/scripts/python/unparse.py b/tests/scripts/python/unparse.py index f3e265a4b..423db1549 100755 --- a/tests/scripts/python/unparse.py +++ b/tests/scripts/python/unparse.py @@ -460,7 +460,14 @@ class UnparsePerl(UnparsePython): """Add an AST Return in output.""" self.fill('return') if node.value: - self.add(' ', node.value, ';') + self.add( + ' ', + (self.prefix, + '%' if isinstance(node.value, ast.Dict) else '$'), + node.value, + (self.prefix, None), + ';', + ) def _ast_str(self, node): """Add an AST Str in output."""