Skip to content

Commit 6c90585

Browse files
committed
Drop compat code for cp and mv from #512
1 parent f42315e commit 6c90585

File tree

4 files changed

+20
-29
lines changed

4 files changed

+20
-29
lines changed

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@ Currently, the `@compat` macro supports the following syntaxes:
7272

7373
* `range` supporting `stop` as positional argument ([#28708]).
7474

75-
* `Compat.mv` and `Compat.cp` with `force` keyword argument ([#26069]).
76-
7775
* `Compat.accumulate`, `Compat.accumulate!`, `Compat.all`, `Compat.any`,
7876
`Compat.cumprod`, `Compat.cumprod!`, `Compat.cumsum`, `Compat.cumsum!`,
7977
`Compat.findmax`, `Compat.findmin`, `Compat.mapreduce`, `Compat.maximum`,

src/Compat.jl

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,6 @@ end
7676
end
7777
end
7878

79-
@static if VERSION < v"0.7.0-DEV.3995"
80-
cp(src::AbstractString, dst::AbstractString; force::Bool=false, follow_symlinks::Bool=false) =
81-
Base.cp(src, dst; remove_destination = force, follow_symlinks = follow_symlinks)
82-
mv(src::AbstractString, dst::AbstractString; force::Bool=false) =
83-
Base.mv(src, dst; remove_destination = force)
84-
end
85-
8679
if VERSION < v"0.7.0-DEV.3972"
8780
function indexin(a, b::AbstractArray)
8881
inds = keys(b)

test/old.jl

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -836,3 +836,23 @@ end
836836
@test Compat.range(2, stop=8) == 2:8
837837
@test Compat.range(2, step=2, length=8) == 2:2:16
838838
@test Compat.range(1.0, stop=2.0, length=3) == 1.0:0.5:2.0
839+
840+
# 0.7.0-DEV.3995
841+
mktempdir(@__DIR__) do dir
842+
src = joinpath(dir, "src.jl")
843+
touch(src)
844+
dest = joinpath(dir, "dest.jl")
845+
touch(dest)
846+
open(src, "w") do f
847+
write(f, "Hello, world!")
848+
end
849+
Compat.cp(src, dest, force = true)
850+
open(dest, "r") do f
851+
@test read(f, String) == "Hello, world!"
852+
end
853+
Compat.mv(src, dest, force = true)
854+
open(dest, "r") do f
855+
@test read(f, String) == "Hello, world!"
856+
end
857+
@test readdir(dir) == ["dest.jl"]
858+
end

test/runtests.jl

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -89,26 +89,6 @@ if VERSION < v"0.7.0-DEV.4592"
8989
@test findall(occursin([1, 2]), [1]) == [1]
9090
end
9191

92-
# 0.7.0-DEV.3995
93-
mktempdir(@__DIR__) do dir
94-
src = joinpath(dir, "src.jl")
95-
touch(src)
96-
dest = joinpath(dir, "dest.jl")
97-
touch(dest)
98-
open(src, "w") do f
99-
write(f, "Hello, world!")
100-
end
101-
Compat.cp(src, dest, force = true)
102-
open(dest, "r") do f
103-
@test read(f, String) == "Hello, world!"
104-
end
105-
Compat.mv(src, dest, force = true)
106-
open(dest, "r") do f
107-
@test read(f, String) == "Hello, world!"
108-
end
109-
@test readdir(dir) == ["dest.jl"]
110-
end
111-
11292
# 0.7.0-DEV.3972
11393
@test Compat.indexin([1, 2], [1, 0, 1]) == [1, nothing]
11494

0 commit comments

Comments
 (0)