From 6971eedee776d0014c94cbee519655e37707a8f7 Mon Sep 17 00:00:00 2001 From: Andrey Listopadov Date: Wed, 30 Aug 2023 19:33:12 +0300 Subject: rename the lazy-seq function to lazy-seq* to avoid name clash with a macro --- tasks/build | 19 +++++++++++++++++++ tasks/run-tests | 10 ++++++++++ 2 files changed, 29 insertions(+) create mode 100644 tasks/build create mode 100644 tasks/run-tests (limited to 'tasks') diff --git a/tasks/build b/tasks/build new file mode 100644 index 0000000..b1fa0eb --- /dev/null +++ b/tasks/build @@ -0,0 +1,19 @@ +;; -*- mode: fennel; -*- vi:ft=fennel + +(fn spit-lib [path to] + (with-open [lib (io.open path)] + (each [line (lib:lines)] + ;; patching compile-time variable used to store macro module + ;; namr because when loafing the combined file it will always + ;; equal the the main module and will break macros in vendored + ;; libraries. + (case (line:match "%(local lib%-name %(or %.%.%. (.*)") + name (to:write (.. "(local lib-name (or " name "\n")) + _ (to:write line "\n"))))) + +(with-open [cljlib (io.open "./cljlib.fnl" :w)] + (let [main (io.open "src/cljlib.fnl")] + (each [line (main:lines)] + (case (line:match ";;;###include (.*)") + (path) (spit-lib path cljlib) + _ (cljlib:write line "\n"))))) diff --git a/tasks/run-tests b/tasks/run-tests new file mode 100644 index 0000000..63a43d7 --- /dev/null +++ b/tasks/run-tests @@ -0,0 +1,10 @@ +;; -*- mode: fennel; -*- vi:ft=fennel + +(local t (require :fennel-test.fennel-test)) + +(local test-modules + [:tests.core + :tests.fn + :tests.macros]) + +(t.run-tests test-modules) -- cgit v1.2.3