From 9c7c783514b1dc90985f7d0fc6723ef213de80b8 Mon Sep 17 00:00:00 2001 From: ScottPJones Date: Sun, 21 Oct 2018 15:42:07 -0400 Subject: [PATCH] Update for new StrAPI --- REQUIRE | 2 +- src/charsets.jl | 2 +- test/runtests.jl | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/REQUIRE b/REQUIRE index cffe70e..ef2ff11 100644 --- a/REQUIRE +++ b/REQUIRE @@ -1,3 +1,3 @@ julia 0.6 2- ModuleInterfaceTools 0.1.7 -StrAPI 0.1.8 +StrAPI 0.1.9 diff --git a/src/charsets.jl b/src/charsets.jl index 9e1a838..bd4ee00 100644 --- a/src/charsets.jl +++ b/src/charsets.jl @@ -25,7 +25,7 @@ for lst in cse_info nam = lst[1] csnam = symstr(nam, "CharSet") @eval const $csnam = CharSet{$(quotesym(nam))} - @eval show(io::IO, ::Type{$csnam}) = print(IO, string(csnam)) + @eval show(io::IO, ::Type{$csnam}) = print(io, $(string(csnam))) @eval push!(charset_types, $csnam) @eval @api $(String(nam)[1] == '_' ? :develop : :public) $csnam end diff --git a/test/runtests.jl b/test/runtests.jl index cd45114..07a6dee 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -7,6 +7,8 @@ using ModuleInterfaceTools @testset "CharSet" begin for CS in charset_types @test CS <: CharSet + nam = sprint(show, CS) + @test endswith(nam, "CharSet") || startswith(nam, "CharSet{:") end end @@ -23,3 +25,8 @@ end @test encoding(CS) <: Encoding end end + +@testset "show charsets" begin + for CS in charset_types + end +end