From a3b67eb9dcfff095d9f85072a1f20d15129ea7e9 Mon Sep 17 00:00:00 2001 From: David Varela <00.varela.david@gmail.com> Date: Sat, 23 Nov 2019 16:05:33 -0800 Subject: [PATCH] "targets" test honors compat --- test/new.jl | 8 ++++++++ test/test_packages/TestTargetCompat/Project.toml | 13 +++++++++++++ .../TestTargetCompat/src/TestTargetCompat.jl | 5 +++++ .../test_packages/TestTargetCompat/test/runtests.jl | 4 ++++ 4 files changed, 30 insertions(+) create mode 100644 test/test_packages/TestTargetCompat/Project.toml create mode 100644 test/test_packages/TestTargetCompat/src/TestTargetCompat.jl create mode 100644 test/test_packages/TestTargetCompat/test/runtests.jl diff --git a/test/new.jl b/test/new.jl index a61be6a71f..2340fd684f 100644 --- a/test/new.jl +++ b/test/new.jl @@ -228,6 +228,14 @@ end @test deps[UUID("c86f0f68-174e-41db-bd5e-b032223de205")].version == v"1.2.3" end end end + isolate(loaded_depot=false) do; mktempdir() do tempdir + path = copy_test_package(tempdir, "TestTargetCompat") + Pkg.activate(path) + inside_test_sandbox() do + deps = Pkg.dependencies() + @test deps[exuuid].version == v"0.3.0" + end + end end end # diff --git a/test/test_packages/TestTargetCompat/Project.toml b/test/test_packages/TestTargetCompat/Project.toml new file mode 100644 index 0000000000..d4b550dfc5 --- /dev/null +++ b/test/test_packages/TestTargetCompat/Project.toml @@ -0,0 +1,13 @@ +name = "TestTargetCompat" +uuid = "35eb4107-c6fc-4419-a960-db40ac6ea1fa" +authors = ["David Varela <00.varela.david@gmail.com>"] +version = "0.1.0" + +[compat] +Example = "= 0.3.0" + +[extras] +Example = "7876af07-990d-54b4-ab0e-23690620f79a" + +[targets] +test = ["Example"] diff --git a/test/test_packages/TestTargetCompat/src/TestTargetCompat.jl b/test/test_packages/TestTargetCompat/src/TestTargetCompat.jl new file mode 100644 index 0000000000..e8875c1bfc --- /dev/null +++ b/test/test_packages/TestTargetCompat/src/TestTargetCompat.jl @@ -0,0 +1,5 @@ +module TestTargetCompat + +greet() = print("Hello World!") + +end # module diff --git a/test/test_packages/TestTargetCompat/test/runtests.jl b/test/test_packages/TestTargetCompat/test/runtests.jl new file mode 100644 index 0000000000..f6c0b2a0db --- /dev/null +++ b/test/test_packages/TestTargetCompat/test/runtests.jl @@ -0,0 +1,4 @@ +module Runtests +import Example + +end