mirror of
https://github.com/tealdeer-rs/tealdeer.git
synced 2026-08-09 09:49:10 +02:00
Add tests for osx/macos alias (#407)
Co-authored-by: Niklas Mohrin <dev@niklasmohrin.de>
This commit is contained in:
parent
b9f116d629
commit
09d44110f8
1 changed files with 28 additions and 0 deletions
28
tests/lib.rs
28
tests/lib.rs
|
|
@ -652,6 +652,34 @@ fn test_multiple_platform_command_search_not_found() {
|
|||
.stderr(contains("Page `windows-only` not found in cache."));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_macos_is_alias_for_osx() {
|
||||
let testenv = TestEnv::new();
|
||||
testenv.add_os_entry("osx", "maconly", "this command only exists on mac");
|
||||
|
||||
testenv
|
||||
.command()
|
||||
.args(["--platform", "macos", "maconly"])
|
||||
.assert()
|
||||
.success();
|
||||
testenv
|
||||
.command()
|
||||
.args(["--platform", "osx", "maconly"])
|
||||
.assert()
|
||||
.success();
|
||||
|
||||
testenv
|
||||
.command()
|
||||
.args(["--platform", "macos", "--list"])
|
||||
.assert()
|
||||
.stdout("maconly\n");
|
||||
testenv
|
||||
.command()
|
||||
.args(["--platform", "osx", "--list"])
|
||||
.assert()
|
||||
.stdout("maconly\n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_common_platform_is_used_as_fallback() {
|
||||
let testenv = TestEnv::new();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue