Debian Codegraph @

test/relative-filename.fnl

raw
1 (require-macros ((fn [mod fname]
2 ;; this expression is evaluated by the compiler with
3 ;; the current module and filename injected via ...
4 ;; mod name is this module
5 (assert (= mod :test.relative-filename))
6 ;; filename is this file
7 (assert (or (= fname :./test/relative-filename.fnl)
8 (= fname "./test\\relative-filename.fnl"))
9 (.. "filename was incorrect: " fname))
10 ;; return a good value as we are not testing this.
11 (values :test.relative.macros)) ...))
12
13 (import-macros {:inc i-inc} ((fn [mod fname]
14 (assert (= mod :test.relative-filename))
15 (assert (or (= fname :./test/relative-filename.fnl)
16 (= fname "./test\\relative-filename.fnl"))
17 (.. "filename was incorrect: " fname))
18 ;; return a good value as we are not testing this.
19 (values :test.relative.macros)) ...))
20 (+ (i-inc 0) (inc 0))