diff --git a/src/pkgdefaults.jl b/src/pkgdefaults.jl index 2e1466e5..cb1788a0 100644 --- a/src/pkgdefaults.jl +++ b/src/pkgdefaults.jl @@ -394,8 +394,8 @@ const μ0 = 4π*(1//10)^7*H/m # exact (but gets promoted to Float64...), \nA quantity representing the vacuum permittivity constant, defined as 1 / (μ0 × c^2). \nDimension: 𝐈^2 𝐓^4 𝐋^-3 𝐌^-1. \nSee also: [`Unitful.μ0`](@ref), [`Unitful.c`](@ref)." -const ɛ0 = 1/(μ0*c^2) # exact, electric constant; changes here may affect -@doc @doc(ɛ0) const ϵ0 = ɛ0 # test of issue 79. +const ε0 = 1/(μ0*c^2) # exact, electric constant; changes here may affect +@doc @doc(ε0) const ϵ0 = ε0 # test of issue 79. " Unitful.Z0 \nA quantity representing the impedance of free space, a constant defined as μ0 × c. \nDimension: 𝐋^2 𝐌 𝐈^-2 𝐓^-3. diff --git a/test/runtests.jl b/test/runtests.jl index aa579521..d99f767a 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -188,7 +188,7 @@ end @test uconvert(g, 1*FixedUnits(kg)) == 1000g # manual conversion okay @test (1kg, 2g, 3mg, missing) .|> g === (1000g, 2g, (3//1000)g, missing) # Issue 79: - @test isapprox(upreferred(Unitful.ɛ0), 8.85e-12u"F/m", atol=0.01e-12u"F/m") + @test isapprox(upreferred(Unitful.ε0), 8.85e-12u"F/m", atol=0.01e-12u"F/m") # Issue 261: @test 1u"rps" == 360°/s @test 1u"rps" == 2π/s @@ -1861,6 +1861,11 @@ end @test uparse("µm") === uparse("μm") @test uparse("dBµV") === uparse("dBμV") @test @doc(Unitful.µm) == @doc(Unitful.μm) + # Julia treats ɛ (U+025B) and ε (U+03B5) as the same + @test Unitful.ɛ0 === Unitful.ε0 + @test u"ɛ0" === u"ε0" + @test uparse("ɛ0") === uparse("ε0") + @test @doc(Unitful.ɛ0) == @doc(Unitful.ε0) end module DocUnits