Skip to content

Commit

Permalink
New package: tere-1.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
zen0bit committed Apr 11, 2024
1 parent ac8a230 commit 873c591
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
43 changes: 43 additions & 0 deletions srcpkgs/tere/patches/case_sensitive_mode_test.patch
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]
11 changes: 11 additions & 0 deletions srcpkgs/tere/template
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

0 comments on commit 873c591

Please sign in to comment.