From 6e3a012526bcd1f4a5f12645129f7121f4619a89 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 dc2fcb103..e748b5320 100644 --- a/README.md +++ b/README.md @@ -112,9 +112,6 @@ Currently, the `@compat` macro supports the following syntaxes: * `findin(a, b)` is now `findall(in(b), a)` ([#24673]). -* `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 960ea0786..5fc604924 100644 --- a/test/old.jl +++ b/test/old.jl @@ -859,3 +859,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 bb3cf85c4..67e39d477 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -89,14 +89,6 @@ if VERSION < v"0.7.0-DEV.4592" @test findall(occursin([1, 2]), [1]) == [1] end -# 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