From 694502a8859a59eb155d9666709afb79c660b325 Mon Sep 17 00:00:00 2001 From: Chris de Graaf Date: Sun, 1 Oct 2017 22:37:29 -0500 Subject: [PATCH] Test that all licenses are included in LICENSES --- test/tests.jl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/tests.jl b/test/tests.jl index 770db4f..45eab85 100644 --- a/test/tests.jl +++ b/test/tests.jl @@ -352,9 +352,9 @@ end old_stdout = STDOUT out_read, out_write = redirect_stdout() available_licenses() - licenses = join(Char(c) for c in readavailable(out_read)) + licenses = String(readavailable(out_read)) show_license("MIT") - mit = join(Char(c) for c in readavailable(out_read)) + mit = String(readavailable(out_read)) close(out_write) close(out_read) redirect_stdout(old_stdout) @@ -365,6 +365,10 @@ end @test strip(mit) == strip(read_license("MIT")) @test strip(read_license("MIT")) == strip(readstring(joinpath(LICENSE_DIR, "MIT"))) @test_throws ArgumentError read_license(fake_path) + + for license in readdir(LICENSE_DIR) + @test haskey(LICENSES, license) + end end @testset "Plugins" begin