File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -16,3 +16,43 @@ fn recipe_dependency_nested_module() {
16
16
. stdout ( "BAZ\n " )
17
17
. run ( ) ;
18
18
}
19
+
20
+ #[ test]
21
+ fn recipe_dependency_nested_module2 ( ) {
22
+ Test :: new ( )
23
+ . write ( "foo.just" , "mod bar\n baz: \n @echo BAR" )
24
+ . write ( "bar.just" , "baz:\n @echo BAZ" )
25
+ . justfile (
26
+ "
27
+ mod foo
28
+ baz: foo::baz
29
+ " ,
30
+ )
31
+ . arg ( "baz" )
32
+ . stdout ( "BAR\n " )
33
+ . run ( ) ;
34
+ }
35
+
36
+ #[ test]
37
+ fn recipe_dependency_on_module_fails ( ) {
38
+ Test :: new ( )
39
+ . write ( "foo.just" , "mod bar\n baz: \n @echo BAR" )
40
+ . write ( "bar.just" , "baz:\n @echo BAZ" )
41
+ . justfile (
42
+ "
43
+ mod foo
44
+ baz: foo::bar
45
+ " ,
46
+ )
47
+ . arg ( "baz" )
48
+ . status ( 1 )
49
+ . stderr (
50
+ "error: Recipe `baz` has unknown dependency `foo::bar`
51
+ ——▶ justfile:2:11
52
+ │
53
+ 2 │ baz: foo::bar
54
+ │ ^^^
55
+ " ,
56
+ )
57
+ . run ( ) ;
58
+ }
You can’t perform that action at this time.
0 commit comments