From 048d7da179c3fde6f66f314e7d6d7265add0e221 Mon Sep 17 00:00:00 2001 From: Fengyang Wang Date: Sun, 12 Jun 2016 00:25:53 -0400 Subject: [PATCH] Fix @os_only deprecation warnings --- REQUIRE | 2 +- test/runtests.jl | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/REQUIRE b/REQUIRE index 550b8a4..04dc960 100644 --- a/REQUIRE +++ b/REQUIRE @@ -1,2 +1,2 @@ julia 0.3 -Compat 0.7.16 +Compat 0.7.20 diff --git a/test/runtests.jl b/test/runtests.jl index 54db0cd..fb0d0d2 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -211,9 +211,12 @@ obj = JSON.parse("{\"\U0001d712\":\"\\ud835\\udf12\"}") tmppath, io = mktemp() write(io, facebook) close(io) -@unix_only @test haskey(JSON.parsefile(tmppath), "data") -# don't use mmap on Windows, to avoid ERROR: unlink: operation not permitted (EPERM) -@windows_only @test haskey(JSON.parsefile(tmppath; use_mmap=false), "data") +if is_windows() + # don't use mmap on Windows, to avoid ERROR: unlink: operation not permitted (EPERM) + @test haskey(JSON.parsefile(tmppath; use_mmap=false), "data") +else + @test haskey(JSON.parsefile(tmppath), "data") +end rm(tmppath) # check indented json has same final value as non indented