1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
|
use super::*;
#[test]
fn summary() {
Test::new()
.arg("--summary")
.justfile(
"b: a
a:
d: c
c: b
_z: _y
_y:
",
)
.stdout("a b c d\n")
.run();
}
#[test]
fn summary_sorted() {
Test::new()
.arg("--summary")
.justfile(
"
b:
c:
a:
",
)
.stdout("a b c\n")
.run();
}
#[test]
fn summary_unsorted() {
Test::new()
.arg("--summary")
.arg("--unsorted")
.justfile(
"
b:
c:
a:
",
)
.stdout("b c a\n")
.run();
}
#[test]
fn summary_none() {
Test::new()
.arg("--summary")
.arg("--quiet")
.justfile("")
.stdout("\n\n\n")
.run();
}
#[test]
fn no_recipes() {
Test::new()
.arg("--summary")
.stderr("Justfile contains no recipes.\n")
.stdout("\n\n\n")
.run();
}
#[test]
fn submodule_recipes() {
Test::new()
.write("foo.just", "mod bar\nfoo:")
.write("bar.just", "mod baz\nbar:")
.write("baz.just", "mod biz\nbaz:")
.write("biz.just", "biz:")
.justfile(
"
mod foo
bar:
",
)
.arg("--summary")
.stdout("bar foo::foo foo::bar::bar foo::bar::baz::baz foo::bar::baz::biz::biz\n")
.run();
}
#[test]
fn summary_implies_unstable() {
Test::new()
.write("foo.just", "foo:")
.justfile(
"
mod foo
",
)
.arg("--summary")
.stdout("foo::foo\n")
.run();
}
|