aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGokul Soumya2022-04-18 17:06:22 +0000
committerBlaž Hrastnik2022-04-29 06:51:14 +0000
commit22ae1b92a6ef312a1a796bf857cca590efb970d6 (patch)
tree8c793c913848fb55434cbd42a8ea7fcf21c69852
parent76175dbd6da4f57118eb52477f3336c6dcab5692 (diff)
Fix tests for surround primitives
-rw-r--r--helix-core/src/surround.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/helix-core/src/surround.rs b/helix-core/src/surround.rs
index 6f1fdb95..db51b8f1 100644
--- a/helix-core/src/surround.rs
+++ b/helix-core/src/surround.rs
@@ -343,7 +343,7 @@ mod test {
// cursor on s[o]me, c[h]ars, newl[i]ne
assert_eq!(
- get_surround_pos(slice, &selection, '(', 1)
+ get_surround_pos(slice, &selection, Some('('), 1)
.unwrap()
.as_slice(),
&[0, 5, 7, 13, 15, 23]
@@ -359,7 +359,7 @@ mod test {
Selection::new(SmallVec::from_slice(&[Range::point(2), Range::point(9)]), 0);
// cursor on s[o]me, c[h]ars
assert_eq!(
- get_surround_pos(slice, &selection, '(', 1),
+ get_surround_pos(slice, &selection, Some('('), 1),
Err(Error::PairNotFound) // different surround chars
);
@@ -369,7 +369,7 @@ mod test {
);
// cursor on [x]x, newli[n]e
assert_eq!(
- get_surround_pos(slice, &selection, '(', 1),
+ get_surround_pos(slice, &selection, Some('('), 1),
Err(Error::PairNotFound) // overlapping surround chars
);
@@ -377,7 +377,7 @@ mod test {
Selection::new(SmallVec::from_slice(&[Range::point(2), Range::point(3)]), 0);
// cursor on s[o][m]e
assert_eq!(
- get_surround_pos(slice, &selection, '[', 1),
+ get_surround_pos(slice, &selection, Some('['), 1),
Err(Error::CursorOverlap)
);
}