on master help sign in
Fix tests for surround primitives
commit22ae1b92a6ef312a1a796bf857cca590efb970d6 authorGokul Soumya <gokulps15@gmail.com> dateMon 18 Apr 2022, 22:36 (5 years ago) parent76175db
1 file changed+4−4
helix-core/src/surround.rs+4−4
helix-core/src/surround.rs+4−4
@@ -343,7 +343,7 @@ mod test {
343343
344344 // cursor on s[o]me, c[h]ars, newl[i]ne
345345 assert_eq!(
346− get_surround_pos(slice, &selection, '(', 1)
346+ get_surround_pos(slice, &selection, Some('('), 1)
347347 .unwrap()
348348 .as_slice(),
349349 &[0, 5, 7, 13, 15, 23]
@@ -359,7 +359,7 @@ mod test {
359359 Selection::new(SmallVec::from_slice(&[Range::point(2), Range::point(9)]), 0);
360360 // cursor on s[o]me, c[h]ars
361361 assert_eq!(
362− get_surround_pos(slice, &selection, '(', 1),
362+ get_surround_pos(slice, &selection, Some('('), 1),
363363 Err(Error::PairNotFound) // different surround chars
364364 );
365365
@@ -369,7 +369,7 @@ mod test {
369369 );
370370 // cursor on [x]x, newli[n]e
371371 assert_eq!(
372− get_surround_pos(slice, &selection, '(', 1),
372+ get_surround_pos(slice, &selection, Some('('), 1),
373373 Err(Error::PairNotFound) // overlapping surround chars
374374 );
375375
@@ -377,7 +377,7 @@ mod test {
377377 Selection::new(SmallVec::from_slice(&[Range::point(2), Range::point(3)]), 0);
378378 // cursor on s[o][m]e
379379 assert_eq!(
380− get_surround_pos(slice, &selection, '[', 1),
380+ get_surround_pos(slice, &selection, Some('['), 1),
381381 Err(Error::CursorOverlap)
382382 );
383383 }