Allow unstable features with --summary
(#2210)
This commit is contained in:
parent
e0c031272d
commit
7683c81c08
@ -744,6 +744,8 @@ impl Config {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let unstable = matches.get_flag(arg::UNSTABLE) || subcommand == Subcommand::Summary;
|
||||||
|
|
||||||
Ok(Self {
|
Ok(Self {
|
||||||
check: matches.get_flag(arg::CHECK),
|
check: matches.get_flag(arg::CHECK),
|
||||||
color: Self::color_from_matches(matches)?,
|
color: Self::color_from_matches(matches)?,
|
||||||
@ -783,7 +785,7 @@ impl Config {
|
|||||||
.unwrap()
|
.unwrap()
|
||||||
.into(),
|
.into(),
|
||||||
unsorted: matches.get_flag(arg::UNSORTED),
|
unsorted: matches.get_flag(arg::UNSORTED),
|
||||||
unstable: matches.get_flag(arg::UNSTABLE),
|
unstable,
|
||||||
verbosity: if matches.get_flag(arg::QUIET) {
|
verbosity: if matches.get_flag(arg::QUIET) {
|
||||||
Verbosity::Quiet
|
Verbosity::Quiet
|
||||||
} else {
|
} else {
|
||||||
@ -834,6 +836,7 @@ mod tests {
|
|||||||
$(shell_args: $shell_args:expr,)?
|
$(shell_args: $shell_args:expr,)?
|
||||||
$(subcommand: $subcommand:expr,)?
|
$(subcommand: $subcommand:expr,)?
|
||||||
$(unsorted: $unsorted:expr,)?
|
$(unsorted: $unsorted:expr,)?
|
||||||
|
$(unstable: $unstable:expr,)?
|
||||||
$(verbosity: $verbosity:expr,)?
|
$(verbosity: $verbosity:expr,)?
|
||||||
} => {
|
} => {
|
||||||
#[test]
|
#[test]
|
||||||
@ -854,6 +857,7 @@ mod tests {
|
|||||||
$(shell_args: $shell_args,)?
|
$(shell_args: $shell_args,)?
|
||||||
$(subcommand: $subcommand,)?
|
$(subcommand: $subcommand,)?
|
||||||
$(unsorted: $unsorted,)?
|
$(unsorted: $unsorted,)?
|
||||||
|
$(unstable: $unstable,)?
|
||||||
$(verbosity: $verbosity,)?
|
$(verbosity: $verbosity,)?
|
||||||
..testing::config(&[])
|
..testing::config(&[])
|
||||||
};
|
};
|
||||||
@ -1368,6 +1372,7 @@ mod tests {
|
|||||||
name: subcommand_summary,
|
name: subcommand_summary,
|
||||||
args: ["--summary"],
|
args: ["--summary"],
|
||||||
subcommand: Subcommand::Summary,
|
subcommand: Subcommand::Summary,
|
||||||
|
unstable: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
test! {
|
test! {
|
||||||
|
@ -71,3 +71,18 @@ fn submodule_recipes() {
|
|||||||
.stdout("bar foo::foo foo::bar::bar foo::bar::baz::baz foo::bar::baz::biz::biz\n")
|
.stdout("bar foo::foo foo::bar::bar foo::bar::baz::baz foo::bar::baz::biz::biz\n")
|
||||||
.run();
|
.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn summary_implies_unstable() {
|
||||||
|
Test::new()
|
||||||
|
.write("foo.just", "foo:")
|
||||||
|
.justfile(
|
||||||
|
"
|
||||||
|
mod foo
|
||||||
|
",
|
||||||
|
)
|
||||||
|
.test_round_trip(false)
|
||||||
|
.arg("--summary")
|
||||||
|
.stdout("foo::foo\n")
|
||||||
|
.run();
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user