aboutsummaryrefslogtreecommitdiffstats
path: root/tests/indent/rust/loop.rs
diff options
context:
space:
mode:
authorJędrzej Boczar <yendreij@gmail.com>2021-04-22 20:53:30 +0200
committerKiyan <yazdani.kiyan@protonmail.com>2021-04-23 21:21:38 +0200
commit63a88c873f3643aad9208488765dc53618edd40e (patch)
treefb233a54b0dae8a6af1a12dfecb9cd85cbdb4f64 /tests/indent/rust/loop.rs
parentignore Lua indent test files when doing style-check (diff)
downloadnvim-treesitter-63a88c873f3643aad9208488765dc53618edd40e.tar
nvim-treesitter-63a88c873f3643aad9208488765dc53618edd40e.tar.gz
nvim-treesitter-63a88c873f3643aad9208488765dc53618edd40e.tar.bz2
nvim-treesitter-63a88c873f3643aad9208488765dc53618edd40e.tar.lz
nvim-treesitter-63a88c873f3643aad9208488765dc53618edd40e.tar.xz
nvim-treesitter-63a88c873f3643aad9208488765dc53618edd40e.tar.zst
nvim-treesitter-63a88c873f3643aad9208488765dc53618edd40e.zip
move all tests to top-level tests/ directory
Diffstat (limited to 'tests/indent/rust/loop.rs')
-rw-r--r--tests/indent/rust/loop.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/indent/rust/loop.rs b/tests/indent/rust/loop.rs
new file mode 100644
index 000000000..eb845bc0f
--- /dev/null
+++ b/tests/indent/rust/loop.rs
@@ -0,0 +1,19 @@
+fn foo(mut x: i32) {
+ while x > 0 {
+ x -= 1;
+ }
+
+ for i in 0..3 {
+ x += 1;
+ }
+
+ loop {
+ x += 1;
+
+ if x < 100 {
+ continue;
+ }
+
+ break;
+ }
+}