~technomancy/fennel

7c72a7ac3dd80081748e0d57e943e1ecd7c54bad — Phil Hagelberg 2 years ago a9e0577
Fix macro stack trace test for 5.1.
1 files changed, 3 insertions(+), 2 deletions(-)

M test/failures.fnl
M test/failures.fnl => test/failures.fnl +3 -2
@@ 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