Sha256: 72bc644d984de4b9217cd7e7067424eea13222d77a0cb588964598423ff01ee7
Contents?: true
Size: 1.18 KB
Versions: 64
Compression:
Stored size: 1.18 KB
Contents
using Base.Test import Base.Test.@test_skip, Base.Test.@test_broken # When testing the example solution, all tests must pass, even ones marked as skipped or broken. # The track user will not be affected by this. # Overwrite @test_skip, @test_broken with @test macro test_skip(ex) @test eval(ex) end macro test_broken(ex) @test eval(ex) end for (root, dirs, files) in walkdir("exercises") for exercise in dirs # Allow only testing specified execises if !isempty(ARGS) && !(exercise in ARGS) continue end exercise_path = joinpath("exercises", exercise) # Create temporary directory temp_path = mktempdir(root) # Copy tests & example to the temporary directory cp(joinpath(exercise_path, "example.jl"), joinpath(temp_path, "$exercise.jl")) cp(joinpath(exercise_path, "runtests.jl"), joinpath(temp_path, "runtests.jl")) try # Run the tests @testset "$exercise example" begin include(joinpath(temp_path, "runtests.jl")) end finally # Delete the temporary directory rm(temp_path, recursive=true) end end end
Version data entries
64 entries across 64 versions & 1 rubygems