@@ -8,15 +8,15 @@ defmodule Mix.GleamTest do
8
8
use MixTest.Case
9
9
@ moduletag :gleam
10
10
11
- @ compile { :no_warn_undefined , [ :gleam_dep , :gleam@int ] }
11
+ @ compile { :no_warn_undefined , [ :gleam_dep , :gleam@int , :deeper_gleam_dep ] }
12
12
13
13
defmodule GleamAsDep do
14
14
def project do
15
15
[
16
16
app: :gleam_as_dep ,
17
17
version: "0.1.0" ,
18
18
deps: [
19
- { :gleam_dep , path: MixTest.Case . tmp_path ( "gleam_dep" ) , app: false }
19
+ { :deeper_gleam_dep , path: MixTest.Case . tmp_path ( "subfolder/deeper_gleam_dep" ) }
20
20
]
21
21
]
22
22
end
@@ -30,7 +30,7 @@ defmodule Mix.GleamTest do
30
30
expected = [
31
31
{ :gleam_stdlib , ">= 0.44.0 and < 2.0.0" } ,
32
32
{ :gleam_otp , ">= 0.16.1 and < 1.0.0" } ,
33
- { :gleeunit , ">= 1.0.0 and < 2.0.0" , only: :dev }
33
+ { :gleeunit , ">= 1.0.0 and < 2.0.0" , only: [ :dev , :test ] }
34
34
]
35
35
36
36
assert Enum . sort ( config [ :deps ] ) == Enum . sort ( expected )
@@ -46,8 +46,7 @@ defmodule Mix.GleamTest do
46
46
"gleam" => ">= 1.8.0" ,
47
47
"dependencies" => % {
48
48
"git_dep" => % { "git" => "../git_dep" , "ref" => "957b83b" } ,
49
- "gleam_stdlib" => % { "version" => ">= 0.18.0 and < 2.0.0" } ,
50
- "my_other_project" => % { "path" => "../my_other_project" }
49
+ "gleam_stdlib" => % { "version" => ">= 0.18.0 and < 2.0.0" }
51
50
} ,
52
51
"dev-dependencies" => % {
53
52
"gleeunit" => % { "version" => ">= 1.0.0 and < 2.0.0" }
@@ -66,8 +65,7 @@ defmodule Mix.GleamTest do
66
65
deps: [
67
66
{ :git_dep , git: "../git_dep" , ref: "957b83b" } ,
68
67
{ :gleam_stdlib , ">= 0.18.0 and < 2.0.0" } ,
69
- { :my_other_project , path: "../my_other_project" } ,
70
- { :gleeunit , ">= 1.0.0 and < 2.0.0" , only: :dev }
68
+ { :gleeunit , ">= 1.0.0 and < 2.0.0" , only: [ :dev , :test ] }
71
69
] ,
72
70
application: [
73
71
mod: { :some@application , [ ] } ,
@@ -90,6 +88,7 @@ defmodule Mix.GleamTest do
90
88
assert :gleam_dep . main ( )
91
89
assert :gleam_dep . erl ( ) == ~c' Hello from Collocated Erlang!'
92
90
assert :gleam@int . to_string ( 1 ) == "1"
91
+ assert :deeper_gleam_dep . main ( )
93
92
94
93
{ :ok , content } = :file . consult ( "_build/dev/lib/gleam_dep/ebin/gleam_dep.app" )
95
94
@@ -100,14 +99,16 @@ defmodule Mix.GleamTest do
100
99
[
101
100
{ :modules , [ :collocated_erlang , :gleam_dep ] } ,
102
101
{ :optional_applications , [ ] } ,
103
- { :applications ,
104
- [ :kernel , :stdlib , :elixir , :gleam_otp , :gleam_stdlib , :gleeunit ] } ,
102
+ { :applications , [ :kernel , :stdlib , :elixir , :gleam_otp , :gleam_stdlib ] } ,
105
103
{ :description , ~c" gleam_dep" } ,
106
104
{ :registered , [ ] } ,
107
105
{ :vsn , ~c" 1.0.0" }
108
106
]
109
107
}
110
108
]
109
+
110
+ assert File . exists? ( "_build/dev/lib/deeper_gleam_dep/ebin/deeper_gleam_dep.app" )
111
+ assert :ok == Mix.Tasks.Deps.Loadpaths . run ( [ ] )
111
112
end )
112
113
end
113
114
end
0 commit comments