diff --git a/test/runtests.jl b/test/runtests.jl index a8454c7..857da49 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,7 +1,9 @@ using PlutoPages using Test -@testset "PlutoPages.jl" begin +cache_dir = mktempdir() + +@testset "generate" begin input_dir = PlutoPages.create_test_basic_site() @@ -10,6 +12,8 @@ using Test result = PlutoPages.generate(; dirs...) @test result == dirs.output_dir + global cache_dir = dirs.cache_dir + @info "Done!" dirs readdir(dirs.input_dir) readdir(dirs.output_dir) @test isdir(dirs.output_dir) @@ -24,3 +28,26 @@ using Test end + +@testset "develop" begin + + input_dir = PlutoPages.create_test_basic_site() + + dirs = PlutoPages.create_subdirs(input_dir) + + t = @async PlutoPages.develop(; dirs..., cache_dir=cache_dir) + + sleep(10) + + Base.throwto(t, InterruptException()) + Base.throwto(t, InterruptException()) + Base.throwto(t, InterruptException()) + + try + wait(t) + catch e + if !isa(e, InterruptException) + rethrow(e) + end + end +end