mirror of
https://github.com/tealdeer-rs/tealdeer.git
synced 2026-08-09 09:49:10 +02:00
Add common platform to CLI (#401)
This commit is contained in:
parent
00c7778125
commit
b9f116d629
5 changed files with 44 additions and 15 deletions
16
tests/lib.rs
16
tests/lib.rs
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue