From b7246acd3c89bdc441b1088bcf0acde723f1f0f8 Mon Sep 17 00:00:00 2001 From: Pawel Lampe Date: Thu, 12 Sep 2024 22:29:01 +0200 Subject: [PATCH] Add 'complex_unistatement_lambdas' tests --- .../complex_unistatement_lambdas.in.gd | 12 +++++++++++ .../complex_unistatement_lambdas.out.gd | 21 +++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 tests/formatter/input-output-pairs/complex_unistatement_lambdas.in.gd create mode 100644 tests/formatter/input-output-pairs/complex_unistatement_lambdas.out.gd diff --git a/tests/formatter/input-output-pairs/complex_unistatement_lambdas.in.gd b/tests/formatter/input-output-pairs/complex_unistatement_lambdas.in.gd new file mode 100644 index 00000000..a0c1accc --- /dev/null +++ b/tests/formatter/input-output-pairs/complex_unistatement_lambdas.in.gd @@ -0,0 +1,12 @@ +func foo(x): + pass +func bar(x,y): + pass + +func baz(): + foo(func(): pass) + bar(func(): pass,func(): pass) + var x1 = [func(): pass,func(): pass] + var x2 = [func(): pass,func():pass,] + var x3 = {'x':func(): pass,'y':func(): pass} + var x4 = {'x':func(): pass,'y':func(): pass,} diff --git a/tests/formatter/input-output-pairs/complex_unistatement_lambdas.out.gd b/tests/formatter/input-output-pairs/complex_unistatement_lambdas.out.gd new file mode 100644 index 00000000..5268cf78 --- /dev/null +++ b/tests/formatter/input-output-pairs/complex_unistatement_lambdas.out.gd @@ -0,0 +1,21 @@ +func foo(x): + pass + + +func bar(x, y): + pass + + +func baz(): + foo(func(): pass) + bar(func(): pass, func(): pass) + var x1 = [func(): pass, func(): pass] + var x2 = [ + func(): pass, + func(): pass, + ] + var x3 = {"x": func(): pass, "y": func(): pass} + var x4 = { + "x": func(): pass, + "y": func(): pass, + }