-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
From 8cadf56d5a835da844c70c54f026a22f6c640c8f Mon Sep 17 00:00:00 2001 | ||
From: mgunyho <[email protected]> | ||
Date: Thu, 21 Dec 2023 15:21:37 +0200 | ||
Subject: [PATCH] Fix and improve case sensitive mode test | ||
|
||
Not sure why it was broken in the first place... | ||
|
||
See also discussion in Github issue #93 | ||
--- | ||
src/app_state.rs | 12 ++++++------ | ||
1 file changed, 6 insertions(+), 6 deletions(-) | ||
|
||
diff --git a/src/app_state.rs b/src/app_state.rs | ||
index 5dcdc52e..eb17465b 100644 | ||
--- a/src/app_state.rs | ||
+++ b/src/app_state.rs | ||
@@ -1696,20 +1696,20 @@ mod tests { | ||
fn test_case_sensitive_mode_change() { | ||
let tmp = TempDir::new().unwrap(); | ||
let mut s = create_test_state_with_folders(&tmp, 10, vec!["A", "a"]); | ||
- s.cursor_pos = 2; | ||
+ s.cursor_pos = 1; | ||
s.advance_search("a"); | ||
|
||
// current state: ('*' shows the matches) | ||
// .. | ||
- // A * | ||
- // > a * | ||
+ // > A * | ||
+ // a * | ||
|
||
assert_eq!(s.visible_match_indices(), vec![1, 2]); | ||
- assert_eq!(s.cursor_pos, 2); | ||
+ assert_eq!(s.cursor_pos, 1); | ||
|
||
s.set_case_sensitive(CaseSensitiveMode::CaseSensitive); | ||
- assert_eq!(s.visible_match_indices(), vec![1]); | ||
- assert_eq!(s.cursor_pos, 1); | ||
+ assert_eq!(s.visible_match_indices(), vec![2]); | ||
+ assert_eq!(s.cursor_pos, 2); | ||
} | ||
|
||
#[test] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Template file for 'tere' | ||
pkgname=tere | ||
version=1.5.1 | ||
revision=1 | ||
build_style=cargo | ||
short_desc="Faster alternative to cd + ls" | ||
maintainer="zenobit <[email protected]>" | ||
license="GPL-3.0-or-later" | ||
homepage="https://github.com/mgunyho/tere" | ||
distfiles="https://github.com/mgunyho/tere/archive/refs/tags/v${version}.tar.gz" | ||
checksum=d7f657371ffbd469c4d8855c2a2734c20b53ae632fe3cbf9bb7cab94bd726326 |