File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed
crates/compiler/load_internal/tests Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change @@ -2131,3 +2131,51 @@ fn roc_file_no_extension() {
2131
2131
2132
2132
assert_eq ! ( err, expected, "\n {}" , err) ;
2133
2133
}
2134
+
2135
+ #[ test]
2136
+ fn roc_package_depends_on_other_package ( ) {
2137
+ let modules = vec ! [
2138
+ (
2139
+ "main" ,
2140
+ indoc!(
2141
+ r#"
2142
+ package [Module] { other: "other/main.roc" }
2143
+ "#
2144
+ ) ,
2145
+ ) ,
2146
+ (
2147
+ "Module.roc" ,
2148
+ indoc!(
2149
+ r#"
2150
+ module [foo]
2151
+
2152
+ import other.OtherMod
2153
+
2154
+ foo = OtherMod.say "hello"
2155
+ "#
2156
+ ) ,
2157
+ ) ,
2158
+ (
2159
+ "other/main.roc" ,
2160
+ indoc!(
2161
+ r#"
2162
+ package [OtherMod] {}
2163
+ "#
2164
+ ) ,
2165
+ ) ,
2166
+ (
2167
+ "other/OtherMod.roc" ,
2168
+ indoc!(
2169
+ r#"
2170
+ module [say]
2171
+
2172
+ say = \msg -> "$(msg), world!"
2173
+ "#
2174
+ ) ,
2175
+ ) ,
2176
+ ] ;
2177
+
2178
+ let result = multiple_modules ( "roc_package_depends_on_other_package" , modules) ;
2179
+
2180
+ assert ! ( result. is_ok( ) ) ;
2181
+ }
You can’t perform that action at this time.
0 commit comments