summaryrefslogtreecommitdiffstats
path: root/runtime/indent/testdir
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-12-18 21:41:50 +0100
committerBram Moolenaar <Bram@vim.org>2018-12-18 21:41:50 +0100
commit9d87a37ee9d87f5bdbc779bc940d5f1e6f055d0a (patch)
treef569453cf21f8a14b1a90e6e4edeeb41fe624b70 /runtime/indent/testdir
parenta86187b9cd529754ad85cd621169876317eb3a69 (diff)
Update runtime files.
Diffstat (limited to 'runtime/indent/testdir')
-rw-r--r--runtime/indent/testdir/matlab.in63
-rw-r--r--runtime/indent/testdir/matlab.ok63
-rw-r--r--runtime/indent/testdir/runtest.vim1
-rw-r--r--runtime/indent/testdir/tcl.in2
-rw-r--r--runtime/indent/testdir/tcl.ok20
-rw-r--r--runtime/indent/testdir/xml.in2
-rw-r--r--runtime/indent/testdir/xml.ok40
7 files changed, 159 insertions, 32 deletions
diff --git a/runtime/indent/testdir/matlab.in b/runtime/indent/testdir/matlab.in
index 1a2bc83d4b..5bba1a56dd 100644
--- a/runtime/indent/testdir/matlab.in
+++ b/runtime/indent/testdir/matlab.in
@@ -15,3 +15,66 @@ catch exception
statements
end
% END_INDENT
+
+% START_INDENT
+if true, ...
+if true
+disp hello
+end
+end
+% END_INDENT
+
+% START_INDENT
+switch a
+case expr
+if true, foo; end
+disp hello
+otherwise
+disp bar
+end
+% END_INDENT
+
+% START_INDENT
+if true
+A(1:end - 1)
+disp foo
+end
+% END_INDENT
+
+% START_INDENT
+A = [{
+}
+] ...
+disp foo
+disp bar
+% END_INDENT
+
+% START_INDENT
+% INDENT_EXE let b:MATLAB_function_indent = 0
+function foo
+disp foo
+function nested
+disp bar
+end
+end
+% END_INDENT
+
+% START_INDENT
+% INDENT_EXE let b:MATLAB_function_indent = 1
+function foo
+disp foo
+function nested
+disp bar
+end
+end
+% END_INDENT
+
+% START_INDENT
+% INDENT_EXE let b:MATLAB_function_indent = 2
+function foo
+disp foo
+function nested
+disp bar
+end
+end
+% END_INDENT
diff --git a/runtime/indent/testdir/matlab.ok b/runtime/indent/testdir/matlab.ok
index 88e1d86b06..b1112263b2 100644
--- a/runtime/indent/testdir/matlab.ok
+++ b/runtime/indent/testdir/matlab.ok
@@ -15,3 +15,66 @@ catch exception
statements
end
% END_INDENT
+
+% START_INDENT
+if true, ...
+ if true
+ disp hello
+ end
+end
+% END_INDENT
+
+% START_INDENT
+switch a
+ case expr
+ if true, foo; end
+ disp hello
+ otherwise
+ disp bar
+end
+% END_INDENT
+
+% START_INDENT
+if true
+ A(1:end - 1)
+ disp foo
+end
+% END_INDENT
+
+% START_INDENT
+A = [{
+ }
+ ] ...
+ disp foo
+disp bar
+% END_INDENT
+
+% START_INDENT
+% INDENT_EXE let b:MATLAB_function_indent = 0
+function foo
+disp foo
+ function nested
+ disp bar
+ end
+end
+% END_INDENT
+
+% START_INDENT
+% INDENT_EXE let b:MATLAB_function_indent = 1
+function foo
+disp foo
+ function nested
+ disp bar
+ end
+end
+% END_INDENT
+
+% START_INDENT
+% INDENT_EXE let b:MATLAB_function_indent = 2
+function foo
+ disp foo
+ function nested
+ disp bar
+ end
+end
+% END_INDENT
diff --git a/runtime/indent/testdir/runtest.vim b/runtime/indent/testdir/runtest.vim
index 96c31453af..2943152d3c 100644
--- a/runtime/indent/testdir/runtest.vim
+++ b/runtime/indent/testdir/runtest.vim
@@ -8,6 +8,7 @@ if 1
set nocp
filetype indent on
set nowrapscan
+set report=9999
au! SwapExists * call HandleSwapExists()
func HandleSwapExists()
diff --git a/runtime/indent/testdir/tcl.in b/runtime/indent/testdir/tcl.in
index 3ef4ebc0a8..c769d5bf5e 100644
--- a/runtime/indent/testdir/tcl.in
+++ b/runtime/indent/testdir/tcl.in
@@ -1,4 +1,4 @@
-# vim: set filetype=tcl shiftwidth=4 tabstop=4:
+# vim: set filetype=tcl shiftwidth=4 tabstop=8 expandtab :
# START_INDENT
proc abc {} {
diff --git a/runtime/indent/testdir/tcl.ok b/runtime/indent/testdir/tcl.ok
index 0fb52e782f..77f24e9044 100644
--- a/runtime/indent/testdir/tcl.ok
+++ b/runtime/indent/testdir/tcl.ok
@@ -1,19 +1,19 @@
-# vim: set filetype=tcl shiftwidth=4 tabstop=4:
+# vim: set filetype=tcl shiftwidth=4 tabstop=8 expandtab :
# START_INDENT
proc abc {} {
- set a 5
- if {[some_cmd]==1} {
- foreach i [list {1 2 3}] {
- # Does this comment affect anything?
- puts $i
- }
- }
+ set a 5
+ if {[some_cmd]==1} {
+ foreach i [list {1 2 3}] {
+ # Does this comment affect anything?
+ puts $i
+ }
+ }
}
command_with_a_long_time -arg1 "First" \
- -arg2 "Second" \
- -arg3 "Third"
+ -arg2 "Second" \
+ -arg3 "Third"
puts "Move indent back after line continuation is complete"
# END_INDENT
diff --git a/runtime/indent/testdir/xml.in b/runtime/indent/testdir/xml.in
index d184681c86..b6333340e2 100644
--- a/runtime/indent/testdir/xml.in
+++ b/runtime/indent/testdir/xml.in
@@ -1,4 +1,4 @@
-<!-- vim: set ft=xml ts=2 sw=0 sts=-1 et : -->
+<!-- vim: set ft=xml ts=8 sw=0 sts=-1 et : -->
<!-- START_INDENT -->
<?xml version="1.0" encoding="utf-8"?>
<tag0>
diff --git a/runtime/indent/testdir/xml.ok b/runtime/indent/testdir/xml.ok
index a8e2c92a16..529198572a 100644
--- a/runtime/indent/testdir/xml.ok
+++ b/runtime/indent/testdir/xml.ok
@@ -1,32 +1,32 @@
-<!-- vim: set ft=xml ts=2 sw=0 sts=-1 et : -->
+<!-- vim: set ft=xml ts=8 sw=0 sts=-1 et : -->
<!-- START_INDENT -->
<?xml version="1.0" encoding="utf-8"?>
<tag0>
- <tag1>
- <!-- comment -->
- <tag2>
- <tag3/>
- </tag2>
- <!-- text comment -->
+ <tag1>
+ <!-- comment -->
+ <tag2>
+ <tag3/>
+ </tag2>
+ <!-- text comment -->
- <!--
- text comment
- -->
- </tag1>
- <!--
- text comment
- end coment -->
+ <!--
+ text comment
+ -->
+ </tag1>
+ <!--
+ text comment
+ end coment -->
</tag0>
<!-- END_INDENT -->
<!-- START_INDENT -->
<?xml version="1.0" encoding="utf-8"?>
<tag0>
- <tag1>
- <!-- comment -->
- <tag2>
- <tag3/>
- </tag2>
- </tag1>
+ <tag1>
+ <!-- comment -->
+ <tag2>
+ <tag3/>
+ </tag2>
+ </tag1>
</tag0>
<!-- END_INDENT -->