Add common platform to CLI (#401)

This commit is contained in:
Christoph Loy 2025-01-12 11:50:32 +01:00 committed by GitHub
commit b9f116d629
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 44 additions and 15 deletions

View file

@ -652,6 +652,22 @@ fn test_multiple_platform_command_search_not_found() {
.stderr(contains("Page `windows-only` not found in cache."));
}
#[test]
fn test_common_platform_is_used_as_fallback() {
let testenv = TestEnv::new();
testenv.add_entry("in-common", "this command comes from common");
// No platform specified
testenv.command().args(["in-common"]).assert().success();
// Platform specified
testenv
.command()
.args(["--platform", "linux", "in-common"])
.assert()
.success();
}
#[test]
fn test_list_flag_rendering() {
let testenv = TestEnv::new().write_custom_pages_config();