lotabout.skim/tests/highlighting.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

23 lines
771 B
Rust

#![allow(missing_docs, clippy::pedantic)]
#[allow(dead_code)]
#[macro_use]
mod common;
// Matched query characters get the `current_match` color (1) on the selected row
// and `matched` (9) elsewhere. `@snap_color` captures the per-cell styling so the
// highlight is actually asserted, cross-platform.
insta_test!(highlight_match, ["apple", "banana", "grape"], &["--color=matched:9,current_match:1"], {
@type "pp";
@snap;
@snap_color;
});
// With `current_bg:236`, the selected row also carries that background while its
// matched characters keep the `current_match` foreground (1).
insta_test!(highlight_split_match, ["apple", "banana", "grape"], &["--color=matched:9,current_match:1,current_bg:236"], {
@type "aaa";
@snap;
@snap_color;
});