lotabout.skim/tests/unix.rs
LoricAndre 7e2cdf3c8e
tests: improve coverage to 90% (#1099)
* tests: improve coverage to 90%

* feat: improve coverage

* remove most unix-only tests

* Update src/skim_tests.rs

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* fixes

* chore: misc

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-06-25 19:12:49 +00:00

38 lines
1.1 KiB
Rust

#![allow(missing_docs, clippy::pedantic)]
#![cfg(unix)]
#[allow(dead_code)]
#[macro_use]
mod common;
use common::tmux::Keys::*;
sk_test!(tmux_version_long, "", &["--version"], {
@output[0] starts_with("sk ");
});
sk_test!(tmux_version_short, "", &["-V"], {
@output[0] starts_with("sk ");
});
sk_test!(inline_clear_on_exit, @cmd "seq 1 10", &["--height=50%"], {
@capture[0] starts_with(">");
@keys Escape;
@lines |l| (!l.iter().any(|line| line.starts_with(">")));
});
sk_test!(inline_clear_on_exit_reverse, @cmd "seq 1 10", &["--height=50%", "--layout=reverse"], {
@capture[*] starts_with(">");
@keys Escape;
@lines |l| (!l.iter().any(|line| line.starts_with(">")));
});
sk_test!(inline_clear_on_exit_reverse_list, @cmd "seq 1 10", &["--height=50%", "--layout=reverse-list"], {
@capture[*] starts_with(">");
@keys Escape;
@lines |l| (!l.iter().any(|line| line.starts_with(">")));
});
sk_test!(issue_1120_height_mode_clears_on_exit, @cmd "seq 1 10", &["--height=50%"], {
@capture[0] starts_with(">");
@keys Key('\x1b');
@lines |l| (!l.iter().any(|line| line.starts_with(">")));
});