mirror of
https://github.com/lotabout/skim.git
synced 2026-09-10 07:16:23 -04:00
* wip: windows support * feat: windows support * feat: add windows target to CI * chore: generate completions & manpage * Update src/util.rs Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * chore: cleanup & doc * chore: generate completions & manpage * chore: generate dist * fix: reduplicate default test * chore: regate tmux * chore: remove useless test-utils feature * fix(windows): ignore dirs in default_command * docs: update shell docs for windows * chore: generate completions & manpage * chore(justfile): do not ignore failed tests * fix: upload correct junit after profile change * fix: always execute exit commands * fix: windows-specific ctrl-c handling * chore: misc docs & other updates Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * chore: generate completions & manpage * chore: include license in MSI installer --------- Co-authored-by: Skim bot <skim-bot@skim-rs.github.io> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Your Name <you@example.com>
55 lines
1.6 KiB
Rust
55 lines
1.6 KiB
Rust
#![cfg(unix)]
|
|
#[allow(dead_code)]
|
|
#[macro_use]
|
|
mod common;
|
|
|
|
use common::tmux::Keys::*;
|
|
|
|
sk_test!(highlight_match, @cmd "echo -e 'apple\\nbanana\\ngrape'", &["--color=matched:9,current_match:1"], {
|
|
@capture[2] contains("apple");
|
|
@keys Str("pp");
|
|
|
|
// Wait for filtering to complete - should only show apple
|
|
@capture[1] contains("1/3");
|
|
@capture[2] contains("apple");
|
|
|
|
@capture_colored[2] contains("a");
|
|
@capture_colored[2] contains("pp");
|
|
@capture_colored[2] contains("le");
|
|
|
|
// Check that the 'p' characters in "apple" have highlighting color codes
|
|
@capture_colored[2] contains("\x1b[38;5;1m");
|
|
@capture_colored[2] contains("pp\x1b[");
|
|
|
|
@keys Enter;
|
|
|
|
@output[0] eq("apple");
|
|
});
|
|
|
|
sk_test!(highlight_split_match, @cmd "echo -e 'apple\\nbanana\\ngrape'", &["--color=matched:9,current_match:1,current_bg:236"], {
|
|
@capture[2] contains("apple");
|
|
|
|
@keys Str("aaa");
|
|
|
|
// Wait for filtering to complete - should only show banana
|
|
@capture[1] contains("1/3");
|
|
@capture[2] contains("banana");
|
|
|
|
|
|
@capture_colored[2] contains("b");
|
|
@capture_colored[2] contains("a");
|
|
@capture_colored[2] contains("n");
|
|
|
|
// Check that matched characters have the current_match foreground color (color 1)
|
|
@capture_colored[2] contains("\x1b[38;5;1m");
|
|
// Check that the current line has the current background color (color 236)
|
|
@capture_colored[2] contains("\x1b[48;5;236m");
|
|
// Check that there are 3 matched 'a' characters with foreground color 1
|
|
let match_fg_pattern = "\x1b[38;5;1ma";
|
|
@capture_colored[2] matches(match_fg_pattern).count() == 3;
|
|
|
|
@keys Enter;
|
|
|
|
@output[0] eq("banana");
|
|
});
|