Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-term/tests/test/languages/yaml.rs')
-rw-r--r--helix-term/tests/test/languages/yaml.rs298
1 files changed, 149 insertions, 149 deletions
diff --git a/helix-term/tests/test/languages/yaml.rs b/helix-term/tests/test/languages/yaml.rs
index 1d959640..7669e8a2 100644
--- a/helix-term/tests/test/languages/yaml.rs
+++ b/helix-term/tests/test/languages/yaml.rs
@@ -6,7 +6,7 @@ async fn auto_indent() -> anyhow::Result<()> {
let below_tests = [
(
- indoc! {r##"
+ helpers::platform_line(indoc! {r##"
#[t|]#op:
baz: foo
bazi:
@@ -17,9 +17,9 @@ async fn auto_indent() -> anyhow::Result<()> {
- 2
bax: foox
fook:
- "##},
+ "##}),
"o",
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top:
#[\n|]#
baz: foo
@@ -31,10 +31,10 @@ async fn auto_indent() -> anyhow::Result<()> {
- 2
bax: foox
fook:
- "},
+ "}),
),
(
- indoc! {r##"
+ helpers::platform_line(indoc! {r##"
top:
b#[a|]#z: foo
bazi:
@@ -45,9 +45,9 @@ async fn auto_indent() -> anyhow::Result<()> {
- 2
bax: foox
fook:
- "##},
+ "##}),
"o",
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top:
baz: foo
#[\n|]#
@@ -59,10 +59,10 @@ async fn auto_indent() -> anyhow::Result<()> {
- 2
bax: foox
fook:
- "},
+ "}),
),
(
- indoc! {r##"
+ helpers::platform_line(indoc! {r##"
top:
baz: foo
bazi#[:|]#
@@ -73,9 +73,9 @@ async fn auto_indent() -> anyhow::Result<()> {
- 2
bax: foox
fook:
- "##},
+ "##}),
"o",
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top:
baz: foo
bazi:
@@ -87,10 +87,10 @@ async fn auto_indent() -> anyhow::Result<()> {
- 2
bax: foox
fook:
- "},
+ "}),
),
(
- indoc! {r##"
+ helpers::platform_line(indoc! {r##"
top:
baz: foo
bazi:
@@ -101,9 +101,9 @@ async fn auto_indent() -> anyhow::Result<()> {
- 2
bax: foox
fook:
- "##},
+ "##}),
"o",
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top:
baz: foo
bazi:
@@ -115,10 +115,10 @@ async fn auto_indent() -> anyhow::Result<()> {
- 2
bax: foox
fook:
- "},
+ "}),
),
(
- indoc! {r##"
+ helpers::platform_line(indoc! {r##"
top:
baz: foo
bazi:
@@ -129,9 +129,9 @@ async fn auto_indent() -> anyhow::Result<()> {
- 2
bax: foox
fook:
- "##},
+ "##}),
"o",
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top:
baz: foo
bazi:
@@ -143,10 +143,10 @@ async fn auto_indent() -> anyhow::Result<()> {
- 2
bax: foox
fook:
- "},
+ "}),
),
(
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top:
baz: foo
bazi:
@@ -157,9 +157,9 @@ async fn auto_indent() -> anyhow::Result<()> {
- 2
bax: foox
fook:
- "},
+ "}),
"o",
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top:
baz: foo
bazi:
@@ -171,10 +171,10 @@ async fn auto_indent() -> anyhow::Result<()> {
- 2
bax: foox
fook:
- "},
+ "}),
),
(
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top:
baz: foo
bazi:
@@ -185,9 +185,9 @@ async fn auto_indent() -> anyhow::Result<()> {
- 2
bax: foox
fook:
- "},
+ "}),
"o",
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top:
baz: foo
bazi:
@@ -199,10 +199,10 @@ async fn auto_indent() -> anyhow::Result<()> {
- 2
bax: foox
fook:
- "},
+ "}),
),
(
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top:
baz: foo
bazi:
@@ -213,9 +213,9 @@ async fn auto_indent() -> anyhow::Result<()> {
- 2
bax: foox
fook:#[\n|]#
- "},
+ "}),
"o",
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top:
baz: foo
bazi:
@@ -227,10 +227,10 @@ async fn auto_indent() -> anyhow::Result<()> {
bax: foox
fook:
#[\n|]#
- "},
+ "}),
),
(
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top:
baz: foo
bax: |
@@ -239,9 +239,9 @@ async fn auto_indent() -> anyhow::Result<()> {
line
string#[\n|]#
fook:
- "},
+ "}),
"o",
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top:
baz: foo
bax: |
@@ -251,10 +251,10 @@ async fn auto_indent() -> anyhow::Result<()> {
string
#[\n|]#
fook:
- "},
+ "}),
),
(
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top:
baz: foo
bax: >
@@ -263,9 +263,9 @@ async fn auto_indent() -> anyhow::Result<()> {
line#[\n|]#
string
fook:
- "},
+ "}),
"o",
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top:
baz: foo
bax: >
@@ -275,74 +275,74 @@ async fn auto_indent() -> anyhow::Result<()> {
#[\n|]#
string
fook:
- "},
+ "}),
),
(
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top:
baz: foo
bax: >#[\n|]#
fook:
- "},
+ "}),
"o",
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top:
baz: foo
bax: >
#[\n|]#
fook:
- "},
+ "}),
),
(
- indoc! {"\
+ helpers::platform_line(indoc! {"\
- top:#[\n|]#
baz: foo
bax: foox
fook:
- "},
+ "}),
"o",
- indoc! {"\
+ helpers::platform_line(indoc! {"\
- top:
#[\n|]#
baz: foo
bax: foox
fook:
- "},
+ "}),
),
(
- indoc! {"\
+ helpers::platform_line(indoc! {"\
- top:
baz: foo#[\n|]#
bax: foox
fook:
- "},
+ "}),
"o",
- indoc! {"\
+ helpers::platform_line(indoc! {"\
- top:
baz: foo
#[\n|]#
bax: foox
fook:
- "},
+ "}),
),
(
- indoc! {"\
+ helpers::platform_line(indoc! {"\
- top:
baz: foo
bax: foox#[\n|]#
fook:
- "},
+ "}),
"o",
- indoc! {"\
+ helpers::platform_line(indoc! {"\
- top:
baz: foo
bax: foox
#[\n|]#
fook:
- "},
+ "}),
),
(
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top:
baz:
- one: two#[\n|]#
@@ -350,9 +350,9 @@ async fn auto_indent() -> anyhow::Result<()> {
- top:
baz: foo
bax: foox
- "},
+ "}),
"o",
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top:
baz:
- one: two
@@ -361,42 +361,42 @@ async fn auto_indent() -> anyhow::Result<()> {
- top:
baz: foo
bax: foox
- "},
+ "}),
),
// yaml map without a key
(
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top:#[\n|]#
- "},
+ "}),
"o",
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top:
#[\n|]#
- "},
+ "}),
),
(
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top#[:|]#
bottom: withvalue
- "},
+ "}),
"o",
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top:
#[\n|]#
bottom: withvalue
- "},
+ "}),
),
(
- indoc! {"\
+ helpers::platform_line(indoc! {"\
bottom: withvalue
top#[:|]#
- "},
+ "}),
"o",
- indoc! {"\
+ helpers::platform_line(indoc! {"\
bottom: withvalue
top:
#[\n|]#
- "},
+ "}),
),
];
@@ -406,7 +406,7 @@ async fn auto_indent() -> anyhow::Result<()> {
let above_tests = [
(
- indoc! {r##"
+ helpers::platform_line(indoc! {r##"
#[t|]#op:
baz: foo
bazi:
@@ -417,9 +417,9 @@ async fn auto_indent() -> anyhow::Result<()> {
- 2
bax: foox
fook:
- "##},
+ "##}),
"O",
- indoc! {"\
+ helpers::platform_line(indoc! {"\
#[\n|]#
top:
baz: foo
@@ -431,10 +431,10 @@ async fn auto_indent() -> anyhow::Result<()> {
- 2
bax: foox
fook:
- "},
+ "}),
),
(
- indoc! {r##"
+ helpers::platform_line(indoc! {r##"
top:
b#[a|]#z: foo
bazi:
@@ -445,9 +445,9 @@ async fn auto_indent() -> anyhow::Result<()> {
- 2
bax: foox
fook:
- "##},
+ "##}),
"O",
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top:
#[\n|]#
baz: foo
@@ -459,10 +459,10 @@ async fn auto_indent() -> anyhow::Result<()> {
- 2
bax: foox
fook:
- "},
+ "}),
),
(
- indoc! {r##"
+ helpers::platform_line(indoc! {r##"
top:
baz: foo
bazi#[:|]#
@@ -473,9 +473,9 @@ async fn auto_indent() -> anyhow::Result<()> {
- 2
bax: foox
fook:
- "##},
+ "##}),
"O",
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top:
baz: foo
#[\n|]#
@@ -487,10 +487,10 @@ async fn auto_indent() -> anyhow::Result<()> {
- 2
bax: foox
fook:
- "},
+ "}),
),
(
- indoc! {r##"
+ helpers::platform_line(indoc! {r##"
top:
baz: foo
bazi:
@@ -501,9 +501,9 @@ async fn auto_indent() -> anyhow::Result<()> {
- 2
bax: foox
fook:
- "##},
+ "##}),
"O",
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top:
baz: foo
bazi:
@@ -515,10 +515,10 @@ async fn auto_indent() -> anyhow::Result<()> {
- 2
bax: foox
fook:
- "},
+ "}),
),
(
- indoc! {r##"
+ helpers::platform_line(indoc! {r##"
top:
baz: foo
bazi:
@@ -529,9 +529,9 @@ async fn auto_indent() -> anyhow::Result<()> {
- 2
bax: foox
fook:
- "##},
+ "##}),
"O",
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top:
baz: foo
bazi:
@@ -543,10 +543,10 @@ async fn auto_indent() -> anyhow::Result<()> {
- 2
bax: foox
fook:
- "},
+ "}),
),
(
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top:
baz: foo
bazi:
@@ -557,9 +557,9 @@ async fn auto_indent() -> anyhow::Result<()> {
- 2
bax: foox
fook:
- "},
+ "}),
"O",
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top:
baz: foo
bazi:
@@ -571,10 +571,10 @@ async fn auto_indent() -> anyhow::Result<()> {
- 2
bax: foox
fook:
- "},
+ "}),
),
(
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top:
baz: foo
bazi:
@@ -585,9 +585,9 @@ async fn auto_indent() -> anyhow::Result<()> {
- 2
bax: foox
fook:
- "},
+ "}),
"O",
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top:
baz: foo
bazi:
@@ -599,10 +599,10 @@ async fn auto_indent() -> anyhow::Result<()> {
- 2
bax: foox
fook:
- "},
+ "}),
),
(
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top:
baz: foo
bazi:
@@ -613,9 +613,9 @@ async fn auto_indent() -> anyhow::Result<()> {
- 2
bax: foox
fook:#[\n|]#
- "},
+ "}),
"O",
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top:
baz: foo
bazi:
@@ -627,10 +627,10 @@ async fn auto_indent() -> anyhow::Result<()> {
bax: foox
#[\n|]#
fook:
- "},
+ "}),
),
(
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top:
baz: foo
bax: |
@@ -639,9 +639,9 @@ async fn auto_indent() -> anyhow::Result<()> {
line
string#[\n|]#
fook:
- "},
+ "}),
"O",
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top:
baz: foo
bax: |
@@ -651,10 +651,10 @@ async fn auto_indent() -> anyhow::Result<()> {
#[\n|]#
string
fook:
- "},
+ "}),
),
(
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top:
baz: foo
bax: >
@@ -663,9 +663,9 @@ async fn auto_indent() -> anyhow::Result<()> {
line
string
fook:
- "},
+ "}),
"O",
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top:
baz: foo
bax: >
@@ -675,58 +675,58 @@ async fn auto_indent() -> anyhow::Result<()> {
line
string
fook:
- "},
+ "}),
),
(
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top:
baz: foo
bax: >
fook:#[\n|]#
- "},
+ "}),
"O",
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top:
baz: foo
bax: >
#[\n|]#
fook:
- "},
+ "}),
),
(
- indoc! {"\
+ helpers::platform_line(indoc! {"\
- top:
baz: foo#[\n|]#
bax: foox
fook:
- "},
+ "}),
"O",
- indoc! {"\
+ helpers::platform_line(indoc! {"\
- top:
#[\n|]#
baz: foo
bax: foox
fook:
- "},
+ "}),
),
(
- indoc! {"\
+ helpers::platform_line(indoc! {"\
- top:
baz: foo
bax: foox
fook:#[\n|]#
- "},
+ "}),
"O",
- indoc! {"\
+ helpers::platform_line(indoc! {"\
- top:
baz: foo
bax: foox
#[\n|]#
fook:
- "},
+ "}),
),
(
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top:
baz:
- one: two#[\n|]#
@@ -734,9 +734,9 @@ async fn auto_indent() -> anyhow::Result<()> {
- top:
baz: foo
bax: foox
- "},
+ "}),
"O",
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top:
baz:
#[\n|]#
@@ -745,42 +745,42 @@ async fn auto_indent() -> anyhow::Result<()> {
- top:
baz: foo
bax: foox
- "},
+ "}),
),
// yaml map without a key
(
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top:#[\n|]#
- "},
+ "}),
"O",
- indoc! {"\
+ helpers::platform_line(indoc! {"\
#[\n|]#
top:
- "},
+ "}),
),
(
- indoc! {"\
+ helpers::platform_line(indoc! {"\
bottom: withvalue
top#[:|]#
- "},
+ "}),
"O",
- indoc! {"\
+ helpers::platform_line(indoc! {"\
bottom: withvalue
#[\n|]#
top:
- "},
+ "}),
),
(
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top:
bottom:#[ |]#withvalue
- "},
+ "}),
"O",
- indoc! {"\
+ helpers::platform_line(indoc! {"\
top:
#[\n|]#
bottom: withvalue
- "},
+ "}),
),
];
@@ -790,24 +790,24 @@ async fn auto_indent() -> anyhow::Result<()> {
let enter_tests = [
(
- indoc! {r##"
+ helpers::platform_line(indoc! {r##"
foo: #[b|]#ar
- "##},
+ "##}),
"i<ret>",
- indoc! {"\
- foo:
+ helpers::platform_line(indoc! {"\
+ foo:
#[|b]#ar
- "},
+ "}),
),
(
- indoc! {"\
+ helpers::platform_line(indoc! {"\
foo:#[\n|]#
- "},
+ "}),
"i<ret>",
- indoc! {"\
+ helpers::platform_line(indoc! {"\
foo:
#[|\n]#
- "},
+ "}),
),
];