diff options
| author | Maxime Coste <mawww@kakoune.org> | 2020-06-02 18:40:09 +1000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2020-06-02 18:40:09 +1000 |
| commit | d43b6799cf807b4484e42fcdf3d9300a736fedd9 (patch) | |
| tree | f5074fca3d802ea81065aa7338c98c3dab7b48d5 /test | |
| parent | 0fba373d1d1b852b00db54ad344c69629ef4e0da (diff) | |
| parent | 12cafe3ed4dbc6d16fb7e54d07d6941985631942 (diff) | |
Merge remote-tracking branch 'pickfire/rust-dedent'
Diffstat (limited to 'test')
| -rw-r--r-- | test/indent/rust/after-where/cmd | 1 | ||||
| -rw-r--r-- | test/indent/rust/after-where/in | 5 | ||||
| -rw-r--r-- | test/indent/rust/after-where/out | 7 | ||||
| -rw-r--r-- | test/indent/rust/after-where/rc | 3 | ||||
| -rw-r--r-- | test/indent/rust/comment/cmd | 1 | ||||
| -rw-r--r-- | test/indent/rust/comment/in | 12 | ||||
| -rw-r--r-- | test/indent/rust/comment/out | 18 | ||||
| -rw-r--r-- | test/indent/rust/comment/rc | 3 | ||||
| -rw-r--r-- | test/indent/rust/dedent/cmd | 1 | ||||
| -rw-r--r-- | test/indent/rust/dedent/in | 16 | ||||
| -rw-r--r-- | test/indent/rust/dedent/out | 21 | ||||
| -rw-r--r-- | test/indent/rust/dedent/rc | 3 | ||||
| -rw-r--r-- | test/indent/rust/on-open-paren/cmd | 1 | ||||
| -rw-r--r-- | test/indent/rust/on-open-paren/in | 35 | ||||
| -rw-r--r-- | test/indent/rust/on-open-paren/out | 35 | ||||
| -rw-r--r-- | test/indent/rust/on-open-paren/rc | 3 |
16 files changed, 165 insertions, 0 deletions
diff --git a/test/indent/rust/after-where/cmd b/test/indent/rust/after-where/cmd new file mode 100644 index 00000000..8682d51e --- /dev/null +++ b/test/indent/rust/after-where/cmd @@ -0,0 +1 @@ +c<ret>bar<esc> diff --git a/test/indent/rust/after-where/in b/test/indent/rust/after-where/in new file mode 100644 index 00000000..412f13d3 --- /dev/null +++ b/test/indent/rust/after-where/in @@ -0,0 +1,5 @@ + impl X for T where%( ) + + impl X for T + where%( ) + diff --git a/test/indent/rust/after-where/out b/test/indent/rust/after-where/out new file mode 100644 index 00000000..3cc8383e --- /dev/null +++ b/test/indent/rust/after-where/out @@ -0,0 +1,7 @@ + impl X for T where + bar + + impl X for T + where + bar + diff --git a/test/indent/rust/after-where/rc b/test/indent/rust/after-where/rc new file mode 100644 index 00000000..64064c25 --- /dev/null +++ b/test/indent/rust/after-where/rc @@ -0,0 +1,3 @@ +source "%val{runtime}/colors/default.kak" +source "%val{runtime}/rc/filetype/rust.kak" +set buffer filetype rust diff --git a/test/indent/rust/comment/cmd b/test/indent/rust/comment/cmd new file mode 100644 index 00000000..8682d51e --- /dev/null +++ b/test/indent/rust/comment/cmd @@ -0,0 +1 @@ +c<ret>bar<esc> diff --git a/test/indent/rust/comment/in b/test/indent/rust/comment/in new file mode 100644 index 00000000..d546e66a --- /dev/null +++ b/test/indent/rust/comment/in @@ -0,0 +1,12 @@ + // foo%( ) + + //! foo%( ) + + //!! foo%( ) + + /// foo%( ) + + //// foo%( ) + + println!("hello world"); // foo%( ) + diff --git a/test/indent/rust/comment/out b/test/indent/rust/comment/out new file mode 100644 index 00000000..6b57b5ef --- /dev/null +++ b/test/indent/rust/comment/out @@ -0,0 +1,18 @@ + // foo + // bar + + //! foo + //! bar + + //!! foo + //!! bar + + /// foo + /// bar + + //// foo + //// bar + + println!("hello world"); // foo + bar + diff --git a/test/indent/rust/comment/rc b/test/indent/rust/comment/rc new file mode 100644 index 00000000..64064c25 --- /dev/null +++ b/test/indent/rust/comment/rc @@ -0,0 +1,3 @@ +source "%val{runtime}/colors/default.kak" +source "%val{runtime}/rc/filetype/rust.kak" +set buffer filetype rust diff --git a/test/indent/rust/dedent/cmd b/test/indent/rust/dedent/cmd new file mode 100644 index 00000000..8682d51e --- /dev/null +++ b/test/indent/rust/dedent/cmd @@ -0,0 +1 @@ +c<ret>bar<esc> diff --git a/test/indent/rust/dedent/in b/test/indent/rust/dedent/in new file mode 100644 index 00000000..21c5f6ef --- /dev/null +++ b/test/indent/rust/dedent/in @@ -0,0 +1,16 @@ + foo();%( ) + + foo( + bar().baz(),%( ) + + foo( + bar() + .baz(),%( ) + + foo() + .bar() + .baz();%( ) + + let t = "a + wah";%( ) + diff --git a/test/indent/rust/dedent/out b/test/indent/rust/dedent/out new file mode 100644 index 00000000..cea4d1d3 --- /dev/null +++ b/test/indent/rust/dedent/out @@ -0,0 +1,21 @@ + foo(); + bar + + foo( + bar().baz(), + bar + + foo( + bar() + .baz(), + bar + + foo() + .bar() + .baz(); + bar + + let t = "a + wah"; + bar + diff --git a/test/indent/rust/dedent/rc b/test/indent/rust/dedent/rc new file mode 100644 index 00000000..64064c25 --- /dev/null +++ b/test/indent/rust/dedent/rc @@ -0,0 +1,3 @@ +source "%val{runtime}/colors/default.kak" +source "%val{runtime}/rc/filetype/rust.kak" +set buffer filetype rust diff --git a/test/indent/rust/on-open-paren/cmd b/test/indent/rust/on-open-paren/cmd new file mode 100644 index 00000000..723e4fa3 --- /dev/null +++ b/test/indent/rust/on-open-paren/cmd @@ -0,0 +1 @@ +c{<esc> diff --git a/test/indent/rust/on-open-paren/in b/test/indent/rust/on-open-paren/in new file mode 100644 index 00000000..1ca71d62 --- /dev/null +++ b/test/indent/rust/on-open-paren/in @@ -0,0 +1,35 @@ + fn foo<T>(x: T) + where + T: Debug + %( ) + + fn foo<T>(x: T) where T: Debug %( ) + + impl<T> X for T + where + T: Debug + %( ) + + impl<T> X for T where T: Debug %( ) + + struct X<T> + where + T: Debug + %( ) + + struct X<T> where T: Debug %( ) + + enum X<T> + where + T: Debug + %( ) + + enum X<T> where T: Debug %( ) + + union X<T> + where + T: Debug + %( ) + + union X<T> where T: Debug %( ) + diff --git a/test/indent/rust/on-open-paren/out b/test/indent/rust/on-open-paren/out new file mode 100644 index 00000000..de125ea7 --- /dev/null +++ b/test/indent/rust/on-open-paren/out @@ -0,0 +1,35 @@ + fn foo<T>(x: T) + where + T: Debug + { + + fn foo<T>(x: T) where T: Debug { + + impl<T> X for T + where + T: Debug + { + + impl<T> X for T where T: Debug { + + struct X<T> + where + T: Debug + { + + struct X<T> where T: Debug { + + enum X<T> + where + T: Debug + { + + enum X<T> where T: Debug { + + union X<T> + where + T: Debug + { + + union X<T> where T: Debug { + diff --git a/test/indent/rust/on-open-paren/rc b/test/indent/rust/on-open-paren/rc new file mode 100644 index 00000000..64064c25 --- /dev/null +++ b/test/indent/rust/on-open-paren/rc @@ -0,0 +1,3 @@ +source "%val{runtime}/colors/default.kak" +source "%val{runtime}/rc/filetype/rust.kak" +set buffer filetype rust |
