From b7c7de03ec274db75738786d397554ed88840465 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Str=C3=B6mer?= Date: Sat, 1 Jun 2024 19:26:32 +0200 Subject: [PATCH] test: add basic tests --- test/runtests.jl | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/test/runtests.jl b/test/runtests.jl index d005165..dfe5e19 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -12,5 +12,19 @@ import JET JET.test_package(IESoptLib; target_defined_modules=true) end - # Write your tests here. + @testset "IESoptLib.jl (basic)" verbose = true begin + path_iesoptlib = abspath(dirname(pathof(IESoptLib))) + + @test relpath(get_path(:addons), path_iesoptlib) == "addons" + @test relpath(get_path(:examples), path_iesoptlib) == "examples" + @test relpath(get_path(:templates), path_iesoptlib) == "templates" + + @test_throws ArgumentError get_path(:other) + + n = "01_basic_single_node" + @test get_filename(:example, n) == joinpath(get_path(:examples), "$(n).iesopt.yaml") + # TODO: test addons & templates + + @test_throws ArgumentError get_filename(:other, n) + end end