summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn Isom <John.Isom2001@gmail.com>2020-07-26 12:21:07 -0600
committerJohn Isom <John.Isom2001@gmail.com>2020-07-26 19:04:08 -0600
commit46ea52a0a81a1f4bd1e89df9e5d68be9d08acafa (patch)
tree63dd7a84d02622cf5e133681fc90ecfa05d28c56 /test
parent4b35a701c4e10e45c182eae9e1bf5868cd34ad8f (diff)
Add test cases for c-family closing brace indentation
Diffstat (limited to 'test')
-rw-r--r--test/indent/c-family/deindent-function-closing-brace/cmd1
-rw-r--r--test/indent/c-family/deindent-function-closing-brace/in12
-rw-r--r--test/indent/c-family/deindent-function-closing-brace/out17
-rw-r--r--test/indent/c-family/deindent-function-closing-brace/rc3
-rw-r--r--test/indent/c-family/deindent-generic-closing-brace/cmd1
-rw-r--r--test/indent/c-family/deindent-generic-closing-brace/in25
-rw-r--r--test/indent/c-family/deindent-generic-closing-brace/out35
-rw-r--r--test/indent/c-family/deindent-generic-closing-brace/rc3
-rw-r--r--test/indent/c-family/deindent-if-closing-brace/cmd1
-rw-r--r--test/indent/c-family/deindent-if-closing-brace/in12
-rw-r--r--test/indent/c-family/deindent-if-closing-brace/out17
-rw-r--r--test/indent/c-family/deindent-if-closing-brace/rc3
12 files changed, 130 insertions, 0 deletions
diff --git a/test/indent/c-family/deindent-function-closing-brace/cmd b/test/indent/c-family/deindent-function-closing-brace/cmd
new file mode 100644
index 00000000..e3036a40
--- /dev/null
+++ b/test/indent/c-family/deindent-function-closing-brace/cmd
@@ -0,0 +1 @@
+c<ret>
diff --git a/test/indent/c-family/deindent-function-closing-brace/in b/test/indent/c-family/deindent-function-closing-brace/in
new file mode 100644
index 00000000..34193ba9
--- /dev/null
+++ b/test/indent/c-family/deindent-function-closing-brace/in
@@ -0,0 +1,12 @@
+void foo(void) {%( )}
+
+void foo(void) {%( )
+}
+
+void foo(void) {%( )bar()}
+
+void foo(void) {%( )bar()
+}
+
+void foo(void) {
+ bar()%( )}
diff --git a/test/indent/c-family/deindent-function-closing-brace/out b/test/indent/c-family/deindent-function-closing-brace/out
new file mode 100644
index 00000000..827927d0
--- /dev/null
+++ b/test/indent/c-family/deindent-function-closing-brace/out
@@ -0,0 +1,17 @@
+void foo(void) {
+}
+
+void foo(void) {
+
+}
+
+void foo(void) {
+ bar()}
+
+void foo(void) {
+ bar()
+}
+
+void foo(void) {
+ bar()
+}
diff --git a/test/indent/c-family/deindent-function-closing-brace/rc b/test/indent/c-family/deindent-function-closing-brace/rc
new file mode 100644
index 00000000..2c2a7247
--- /dev/null
+++ b/test/indent/c-family/deindent-function-closing-brace/rc
@@ -0,0 +1,3 @@
+source "%val{runtime}/colors/default.kak"
+source "%val{runtime}/rc/filetype/c-family.kak"
+set buffer filetype cpp
diff --git a/test/indent/c-family/deindent-generic-closing-brace/cmd b/test/indent/c-family/deindent-generic-closing-brace/cmd
new file mode 100644
index 00000000..e3036a40
--- /dev/null
+++ b/test/indent/c-family/deindent-generic-closing-brace/cmd
@@ -0,0 +1 @@
+c<ret>
diff --git a/test/indent/c-family/deindent-generic-closing-brace/in b/test/indent/c-family/deindent-generic-closing-brace/in
new file mode 100644
index 00000000..b2f7c26d
--- /dev/null
+++ b/test/indent/c-family/deindent-generic-closing-brace/in
@@ -0,0 +1,25 @@
+{%( )}
+
+{%( )
+}
+
+{%( )bar()}
+
+{%( )bar()
+}
+
+{
+ bar()%( )}
+
+{(%( ))}
+
+{(%( )
+)}
+
+{(%( )foo())}
+
+{(%( )foo()
+)}
+
+{(
+ bar()%( ))}
diff --git a/test/indent/c-family/deindent-generic-closing-brace/out b/test/indent/c-family/deindent-generic-closing-brace/out
new file mode 100644
index 00000000..58109817
--- /dev/null
+++ b/test/indent/c-family/deindent-generic-closing-brace/out
@@ -0,0 +1,35 @@
+{
+}
+
+{
+
+}
+
+{
+ bar()}
+
+{
+ bar()
+}
+
+{
+ bar()
+}
+
+{(
+)}
+
+{(
+
+)}
+
+{(
+ foo())}
+
+{(
+ foo()
+)}
+
+{(
+ bar()
+)}
diff --git a/test/indent/c-family/deindent-generic-closing-brace/rc b/test/indent/c-family/deindent-generic-closing-brace/rc
new file mode 100644
index 00000000..2c2a7247
--- /dev/null
+++ b/test/indent/c-family/deindent-generic-closing-brace/rc
@@ -0,0 +1,3 @@
+source "%val{runtime}/colors/default.kak"
+source "%val{runtime}/rc/filetype/c-family.kak"
+set buffer filetype cpp
diff --git a/test/indent/c-family/deindent-if-closing-brace/cmd b/test/indent/c-family/deindent-if-closing-brace/cmd
new file mode 100644
index 00000000..e3036a40
--- /dev/null
+++ b/test/indent/c-family/deindent-if-closing-brace/cmd
@@ -0,0 +1 @@
+c<ret>
diff --git a/test/indent/c-family/deindent-if-closing-brace/in b/test/indent/c-family/deindent-if-closing-brace/in
new file mode 100644
index 00000000..8d46bc97
--- /dev/null
+++ b/test/indent/c-family/deindent-if-closing-brace/in
@@ -0,0 +1,12 @@
+if (1) {%( )}
+
+if (1) {%( )
+}
+
+if (1) {%( )bar()}
+
+if (1) {%( )bar()
+}
+
+if (1) {
+ bar()%( )}
diff --git a/test/indent/c-family/deindent-if-closing-brace/out b/test/indent/c-family/deindent-if-closing-brace/out
new file mode 100644
index 00000000..df0b059e
--- /dev/null
+++ b/test/indent/c-family/deindent-if-closing-brace/out
@@ -0,0 +1,17 @@
+if (1) {
+}
+
+if (1) {
+
+}
+
+if (1) {
+ bar()}
+
+if (1) {
+ bar()
+}
+
+if (1) {
+ bar()
+}
diff --git a/test/indent/c-family/deindent-if-closing-brace/rc b/test/indent/c-family/deindent-if-closing-brace/rc
new file mode 100644
index 00000000..2c2a7247
--- /dev/null
+++ b/test/indent/c-family/deindent-if-closing-brace/rc
@@ -0,0 +1,3 @@
+source "%val{runtime}/colors/default.kak"
+source "%val{runtime}/rc/filetype/c-family.kak"
+set buffer filetype cpp