From 7c72a7ac3dd80081748e0d57e943e1ecd7c54bad Mon Sep 17 00:00:00 2001 From: Phil Hagelberg Date: Tue, 16 Mar 2021 21:15:33 -0700 Subject: [PATCH] Fix macro stack trace test for 5.1. --- test/failures.fnl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/failures.fnl b/test/failures.fnl index ca07f4a..2d124fd 100644 --- a/test/failures.fnl +++ b/test/failures.fnl @@ -92,8 +92,9 @@ (let [code "(import-macros {: fail-one} :test.macros) (fail-one 1)" (ok? msg) (pcall fennel.compileString code)] (l.assertStrContains msg "test/macros.fnl:2: oh no") - (l.assertStrContains msg "test/macros.fnl:2: in upvalue 'def'") - (l.assertStrContains msg "test/macros.fnl:6: in upvalue 'abc'"))) + ;; sometimes it's "in function f" and sometimes "in upvalue f" + (l.assertStrMatches msg ".*test/macros.fnl:2: in %w+ 'def'.*") + (l.assertStrMatches msg ".*test/macros.fnl:6: in %w+ 'abc'.*"))) ;; automated tests for suggestions are rudimentary because the usefulness of the ;; output is so subjective. to see a full catalog of suggestions, run the script -- 2.45.2