aboutsummaryrefslogtreecommitdiffstats
path: root/crates/atuin-nucleo/src/pattern/tests.rs
diff options
context:
space:
mode:
authorEllie Huxtable <ellie@atuin.sh>2026-03-16 16:28:54 -0700
committerGitHub <noreply@github.com>2026-03-16 16:28:54 -0700
commita964c27db2a359233bad200a64696b663eca4be5 (patch)
tree9370c6f7b541b79d7183dd754a9d6a863f51c1e2 /crates/atuin-nucleo/src/pattern/tests.rs
parentfeat: Allow headless account ops against Hub server (#3280) (diff)
parentvendor nucleo fork into atuin workspace (diff)
downloadatuin-a964c27db2a359233bad200a64696b663eca4be5.zip
chore: vendor nucleo-ext + fork, so we can depend on our changes properly (#3284)
We cannot publish to crates.io without specifying a version, and we cannot do that without properly forking nucleo. We're shipping atuin-nucleo, but will likely drop this if we can get our changes upstream. This is highlighted in the README + manifest, and the original author is still included. Originally forked here: https://github.com/atuinsh/nucleo-ext cc @BinaryMuse - this should just be a vendor + restructure, but would appreciate the sanity check ## Checks - [ ] I am happy for maintainers to push small adjustments to this PR, to speed up the review cycle - [ ] I have checked that there are no existing pull requests for the same thing
Diffstat (limited to 'crates/atuin-nucleo/src/pattern/tests.rs')
-rw-r--r--crates/atuin-nucleo/src/pattern/tests.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/crates/atuin-nucleo/src/pattern/tests.rs b/crates/atuin-nucleo/src/pattern/tests.rs
new file mode 100644
index 00000000..59ed13f0
--- /dev/null
+++ b/crates/atuin-nucleo/src/pattern/tests.rs
@@ -0,0 +1,14 @@
+use atuin_nucleo_matcher::pattern::{CaseMatching, Normalization};
+
+use crate::pattern::{MultiPattern, Status};
+
+#[test]
+fn append() {
+ let mut pat = MultiPattern::new(1);
+ pat.reparse(0, "!", CaseMatching::Smart, Normalization::Smart, true);
+ assert_eq!(pat.status(), Status::Update);
+ pat.reparse(0, "!f", CaseMatching::Smart, Normalization::Smart, true);
+ assert_eq!(pat.status(), Status::Update);
+ pat.reparse(0, "!fo", CaseMatching::Smart, Normalization::Smart, true);
+ assert_eq!(pat.status(), Status::Rescore);
+}