summaryrefslogtreecommitdiff
path: root/tests/scripts/python
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2018-04-11 23:02:02 +0200
committerSébastien Helleu <flashcode@flashtux.org>2018-04-11 23:02:02 +0200
commitcb4348df612e76cc3fbf65081170dd64bd38ecd2 (patch)
tree89ad340124e13c0cb7f3094a0b75017a0ca060b8 /tests/scripts/python
parentda960e9176c1dad6cce8317aaed010fd541547bd (diff)
downloadweechat-cb4348df612e76cc3fbf65081170dd64bd38ecd2.zip
tests: fix AST return in Perl
Diffstat (limited to 'tests/scripts/python')
-rwxr-xr-xtests/scripts/python/unparse.py9
1 files changed, 8 insertions, 1 deletions
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."""