From c03ca769953206a3f9be4b495cdcdf712806f3ae Mon Sep 17 00:00:00 2001 From: DanielVandH Date: Mon, 6 May 2024 16:14:36 +0100 Subject: [PATCH] Test that the examples in the examples folder run --- test/runtests.jl | 2 +- test/test_examples.jl | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 test/test_examples.jl diff --git a/test/runtests.jl b/test/runtests.jl index 873aa52..4d6052c 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,9 +1,9 @@ using MultivariateOrthogonalPolynomials, Test - include("test_rect.jl") include("test_modalinterlace.jl") include("test_disk.jl") include("test_rectdisk.jl") include("test_triangle.jl") # include("test_dirichlettriangle.jl") +include("test_examples.jl") diff --git a/test/test_examples.jl b/test/test_examples.jl new file mode 100644 index 0000000..a6e16a6 --- /dev/null +++ b/test/test_examples.jl @@ -0,0 +1,8 @@ +examples_path = joinpath(@__DIR__, "..", "examples") +dir = readdir(examples_path) +filter!(file -> endswith(file, ".jl"), dir) +for example_path in dir + script = joinpath(examples_path, example_path) + mod = @eval module $(gensym()) end + Base.include(mod, script) # make sure each script is self-contained +end \ No newline at end of file