aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src/textobject.rs
diff options
context:
space:
mode:
authorIvan Tham2022-03-03 00:55:26 +0000
committerBlaž Hrastnik2022-04-02 15:46:53 +0000
commit45b76db5068791fe6163963976a6a9daf3e9bf9d (patch)
tree4f81d28c3f8cc33c9afc91029f7202935dc31a43 /helix-core/src/textobject.rs
parent8350ee9a0ef38ff4e78bfa5dc30e874d6d2510ef (diff)
Change test mark from ^@ to #[|]#
Diffstat (limited to 'helix-core/src/textobject.rs')
-rw-r--r--helix-core/src/textobject.rs50
1 files changed, 28 insertions, 22 deletions
diff --git a/helix-core/src/textobject.rs b/helix-core/src/textobject.rs
index fb6b7142..cc1e337c 100644
--- a/helix-core/src/textobject.rs
+++ b/helix-core/src/textobject.rs
@@ -357,18 +357,21 @@ mod test {
#[test]
fn test_textobject_paragraph_inside_single() {
let tests = [
- ("^@", "^@"),
- ("firs^t@\n\nparagraph\n\n", "^first\n@\nparagraph\n\n"),
- ("second\n\npa^r@agraph\n\n", "second\n\n^paragraph\n@\n"),
- ("^f@irst char\n\n", "^first char\n@\n"),
- ("last char\n^\n@", "last char\n\n^@"),
+ ("#[|]#", "#[|]#"),
+ ("firs#[t|]#\n\nparagraph\n\n", "#[first\n|]#\nparagraph\n\n"),
(
- "empty to line\n^\n@paragraph boundary\n\n",
- "empty to line\n\n^paragraph boundary\n@\n",
+ "second\n\npa#[r|]#agraph\n\n",
+ "second\n\n#[paragraph\n|]#\n",
),
+ ("#[f|]#irst char\n\n", "#[first char\n|]#\n"),
+ ("last char\n#[\n|]#", "last char\n\n#[|]#"),
(
- "line to empty\n\n^p@aragraph boundary\n\n",
- "line to empty\n\n^paragraph boundary\n@\n",
+ "empty to line\n#[\n|]#paragraph boundary\n\n",
+ "empty to line\n\n#[paragraph boundary\n|]#\n",
+ ),
+ (
+ "line to empty\n\n#[p|]#aragraph boundary\n\n",
+ "line to empty\n\n#[paragraph boundary\n|]#\n",
),
];
@@ -386,12 +389,12 @@ mod test {
fn test_textobject_paragraph_inside_double() {
let tests = [
(
- "last two\n\n^p@aragraph\n\nwithout whitespaces\n\n",
- "last two\n\n^paragraph\n\nwithout whitespaces\n@\n",
+ "last two\n\n#[p|]#aragraph\n\nwithout whitespaces\n\n",
+ "last two\n\n#[paragraph\n\nwithout whitespaces\n|]#\n",
),
(
- "last two\n^\n@paragraph\n\nwithout whitespaces\n\n",
- "last two\n\n^paragraph\n\nwithout whitespaces\n@\n",
+ "last two\n#[\n|]#paragraph\n\nwithout whitespaces\n\n",
+ "last two\n\n#[paragraph\n\nwithout whitespaces\n|]#\n",
),
];
@@ -408,18 +411,21 @@ mod test {
#[test]
fn test_textobject_paragraph_around_single() {
let tests = [
- ("^@", "^@"),
- ("firs^t@\n\nparagraph\n\n", "^first\n\n@paragraph\n\n"),
- ("second\n\npa^r@agraph\n\n", "second\n\n^paragraph\n\n@"),
- ("^f@irst char\n\n", "^first char\n\n@"),
- ("last char\n^\n@", "last char\n\n^@"),
+ ("#[|]#", "#[|]#"),
+ ("firs#[t|]#\n\nparagraph\n\n", "#[first\n\n|]#paragraph\n\n"),
+ (
+ "second\n\npa#[r|]#agraph\n\n",
+ "second\n\n#[paragraph\n\n|]#",
+ ),
+ ("#[f|]#irst char\n\n", "#[first char\n\n|]#"),
+ ("last char\n#[\n|]#", "last char\n\n#[|]#"),
(
- "empty to line\n^\n@paragraph boundary\n\n",
- "empty to line\n\n^paragraph boundary\n\n@",
+ "empty to line\n#[\n|]#paragraph boundary\n\n",
+ "empty to line\n\n#[paragraph boundary\n\n|]#",
),
(
- "line to empty\n\n^p@aragraph boundary\n\n",
- "line to empty\n\n^paragraph boundary\n\n@",
+ "line to empty\n\n#[p|]#aragraph boundary\n\n",
+ "line to empty\n\n#[paragraph boundary\n\n|]#",
),
];