mirror of
https://github.com/lotabout/skim.git
synced 2026-09-10 07:16:23 -04:00
* 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>
38 lines
1.1 KiB
Rust
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(">")));
|
|
});
|