List modules in source order with --unsorted (#2085)

This commit is contained in:
Casey Rodarmor
2024-05-25 01:01:37 -07:00
committed by GitHub
parent ed0dc20318
commit d7059f8bc8
6 changed files with 75 additions and 25 deletions

View File

@@ -35,8 +35,7 @@ fn modules_are_space_separated_in_output() {
",
)
.test_round_trip(false)
.arg("--unstable")
.arg("--list")
.args(["--unstable", "--list"])
.stdout(
"
Available recipes:
@@ -50,6 +49,33 @@ fn modules_are_space_separated_in_output() {
.run();
}
#[test]
fn modules_unsorted() {
Test::new()
.write("foo.just", "foo:")
.write("bar.just", "bar:")
.justfile(
"
mod foo
mod bar
",
)
.test_round_trip(false)
.args(["--unstable", "--list", "--unsorted"])
.stdout(
"
Available recipes:
foo:
foo
bar:
bar
",
)
.run();
}
#[test]
fn module_recipe_list_alignment_ignores_private_recipes() {
Test::new()