From 94bff6077518d7a706496c66668cb2d745931a42 Mon Sep 17 00:00:00 2001 From: imaqtkatt Date: Tue, 25 Jun 2024 18:10:26 -0300 Subject: [PATCH] Add test with unscoped pattern on definition rule --- tests/golden_tests/compile_file/def_pat_unscoped.bend | 3 +++ tests/snapshots/compile_file__def_pat_unscoped.bend.snap | 8 ++++++++ 2 files changed, 11 insertions(+) create mode 100644 tests/golden_tests/compile_file/def_pat_unscoped.bend create mode 100644 tests/snapshots/compile_file__def_pat_unscoped.bend.snap diff --git a/tests/golden_tests/compile_file/def_pat_unscoped.bend b/tests/golden_tests/compile_file/def_pat_unscoped.bend new file mode 100644 index 00000000..37476696 --- /dev/null +++ b/tests/golden_tests/compile_file/def_pat_unscoped.bend @@ -0,0 +1,3 @@ +add $a b = (+ $a b) + +main = (add 9 4) diff --git a/tests/snapshots/compile_file__def_pat_unscoped.bend.snap b/tests/snapshots/compile_file__def_pat_unscoped.bend.snap new file mode 100644 index 00000000..ad2abaad --- /dev/null +++ b/tests/snapshots/compile_file__def_pat_unscoped.bend.snap @@ -0,0 +1,8 @@ +--- +source: tests/golden_tests.rs +input_file: tests/golden_tests/compile_file/def_pat_unscoped.bend +--- +@add = ($([+] $(a b)) (a b)) + +@main = a + & @add ~ (9 (4 a))