From 8c3f49ab92e77e285522b7d6a673e82f002b2a57 Mon Sep 17 00:00:00 2001 From: Martin Holters Date: Tue, 8 Oct 2019 18:15:11 +0200 Subject: [PATCH] Drop compat code for `isuppercase` and friends from #516 --- README.md | 3 --- src/Compat.jl | 8 -------- test/old.jl | 8 ++++++++ test/runtests.jl | 8 -------- 4 files changed, 8 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 549ee5ba1..7d507910f 100644 --- a/README.md +++ b/README.md @@ -107,9 +107,6 @@ Currently, the `@compat` macro supports the following syntaxes: ## Renaming -* `isupper`, `islower`, `ucfirst` and `lcfirst` are now `isuppercase`, `islowercase`, - `uppercasefirst` and `lowercasefirst` ([#26442]). - * `Compat.split` and `Compat.rsplit` accept `keepempty` keyword argument if `splitter` is given as second argument ([#26634]) diff --git a/src/Compat.jl b/src/Compat.jl index 4a7939294..006e9ab19 100644 --- a/src/Compat.jl +++ b/src/Compat.jl @@ -76,14 +76,6 @@ end end end -if VERSION < v"0.7.0-DEV.4585" - export isuppercase, islowercase, uppercasefirst, lowercasefirst - const isuppercase = isupper - const islowercase = islower - const uppercasefirst = ucfirst - const lowercasefirst = lcfirst -end - if VERSION < v"0.7.0-DEV.4064" for f in (:mean, :median, :var, :varm, :std, :cov, :cor) @eval import .Statistics: $f # compatibility with old Compat versions diff --git a/test/old.jl b/test/old.jl index 62634fc74..96e3c5cd5 100644 --- a/test/old.jl +++ b/test/old.jl @@ -867,3 +867,11 @@ end # 0.7.0-DEV.3972 @test Compat.indexin([1, 2], [1, 0, 1]) == [1, nothing] + +# 0.7.0-DEV.4585 +@test isuppercase('A') +@test !isuppercase('a') +@test islowercase('a') +@test !islowercase('A') +@test uppercasefirst("qwerty") == "Qwerty" +@test lowercasefirst("Qwerty") == "qwerty" diff --git a/test/runtests.jl b/test/runtests.jl index 8433dc6bc..59d0312e8 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -82,14 +82,6 @@ end @test codeunit("foo") == codeunit(SubString("fooαβγ",1,3)) == UInt8 -# 0.7.0-DEV.4585 -@test isuppercase('A') -@test !isuppercase('a') -@test islowercase('a') -@test !islowercase('A') -@test uppercasefirst("qwerty") == "Qwerty" -@test lowercasefirst("Qwerty") == "qwerty" - # 0.7.0-DEV.4064 # some tests are behind a version check below because Julia gave # the wrong result between 0.7.0-DEV.3262 and 0.7.0-DEV.4646