@@ -8,15 +8,15 @@ defmodule Mix.GleamTest do
88 use MixTest.Case
99 @ moduletag :gleam
1010
11- @ compile { :no_warn_undefined , [ :gleam_dep , :gleam@int ] }
11+ @ compile { :no_warn_undefined , [ :gleam_dep , :gleam@int , :deeper_gleam_dep ] }
1212
1313 defmodule GleamAsDep do
1414 def project do
1515 [
1616 app: :gleam_as_dep ,
1717 version: "0.1.0" ,
1818 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" ) }
2020 ]
2121 ]
2222 end
@@ -30,7 +30,7 @@ defmodule Mix.GleamTest do
3030 expected = [
3131 { :gleam_stdlib , ">= 0.44.0 and < 2.0.0" } ,
3232 { :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 ] }
3434 ]
3535
3636 assert Enum . sort ( config [ :deps ] ) == Enum . sort ( expected )
@@ -46,8 +46,7 @@ defmodule Mix.GleamTest do
4646 "gleam" => ">= 1.8.0" ,
4747 "dependencies" => % {
4848 "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" }
5150 } ,
5251 "dev-dependencies" => % {
5352 "gleeunit" => % { "version" => ">= 1.0.0 and < 2.0.0" }
@@ -66,8 +65,7 @@ defmodule Mix.GleamTest do
6665 deps: [
6766 { :git_dep , git: "../git_dep" , ref: "957b83b" } ,
6867 { :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 ] }
7169 ] ,
7270 application: [
7371 mod: { :some@application , [ ] } ,
@@ -90,6 +88,7 @@ defmodule Mix.GleamTest do
9088 assert :gleam_dep . main ( )
9189 assert :gleam_dep . erl ( ) == ~c' Hello from Collocated Erlang!'
9290 assert :gleam@int . to_string ( 1 ) == "1"
91+ assert :deeper_gleam_dep . main ( )
9392
9493 { :ok , content } = :file . consult ( "_build/dev/lib/gleam_dep/ebin/gleam_dep.app" )
9594
@@ -100,14 +99,16 @@ defmodule Mix.GleamTest do
10099 [
101100 { :modules , [ :collocated_erlang , :gleam_dep ] } ,
102101 { :optional_applications , [ ] } ,
103- { :applications ,
104- [ :kernel , :stdlib , :elixir , :gleam_otp , :gleam_stdlib , :gleeunit ] } ,
102+ { :applications , [ :kernel , :stdlib , :elixir , :gleam_otp , :gleam_stdlib ] } ,
105103 { :description , ~c" gleam_dep" } ,
106104 { :registered , [ ] } ,
107105 { :vsn , ~c" 1.0.0" }
108106 ]
109107 }
110108 ]
109+
110+ assert File . exists? ( "_build/dev/lib/deeper_gleam_dep/ebin/deeper_gleam_dep.app" )
111+ assert :ok == Mix.Tasks.Deps.Loadpaths . run ( [ ] )
111112 end )
112113 end
113114 end
0 commit comments