summaryrefslogtreecommitdiff
path: root/test/indent/python
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2024-06-11 19:39:07 +1000
committerMaxime Coste <mawww@kakoune.org>2024-06-11 19:39:07 +1000
commit5a6fb51bdb43f15eafdbe1078183f754b4fecdf6 (patch)
treed04d839f914cf95124ec8e586a7f1687b2a3a536 /test/indent/python
parent17c25cc86a6bf4779f58fe2d2a5c13147bb27f2b (diff)
Tweak python block command test location and remove wall of text
We do not typically go into lengthy explanation of the code in the support scripts. This would have a performance impact (as comments are not trimmed in advance) and feels out of place.
Diffstat (limited to 'test/indent/python')
-rw-r--r--test/indent/python/empty-start-of-file-indented/cmd1
-rw-r--r--test/indent/python/empty-start-of-file-indented/in1
-rw-r--r--test/indent/python/empty-start-of-file-indented/out2
-rw-r--r--test/indent/python/empty-start-of-file-indented/rc3
-rw-r--r--test/indent/python/empty-start-of-file/cmd1
-rw-r--r--test/indent/python/empty-start-of-file/in1
-rw-r--r--test/indent/python/empty-start-of-file/out2
-rw-r--r--test/indent/python/empty-start-of-file/rc3
-rw-r--r--test/indent/python/exit-block-indented/cmd1
-rw-r--r--test/indent/python/exit-block-indented/in4
-rw-r--r--test/indent/python/exit-block-indented/out3
-rw-r--r--test/indent/python/exit-block-indented/rc3
-rw-r--r--test/indent/python/exit-block/cmd1
-rw-r--r--test/indent/python/exit-block/in4
-rw-r--r--test/indent/python/exit-block/out3
-rw-r--r--test/indent/python/exit-block/rc3
-rw-r--r--test/indent/python/not-a-comment-indented/cmd1
-rw-r--r--test/indent/python/not-a-comment-indented/in4
-rw-r--r--test/indent/python/not-a-comment-indented/out5
-rw-r--r--test/indent/python/not-a-comment-indented/rc3
-rw-r--r--test/indent/python/not-a-comment/cmd1
-rw-r--r--test/indent/python/not-a-comment/in4
-rw-r--r--test/indent/python/not-a-comment/out5
-rw-r--r--test/indent/python/not-a-comment/rc3
-rw-r--r--test/indent/python/paragraph-break-indented/cmd1
-rw-r--r--test/indent/python/paragraph-break-indented/in3
-rw-r--r--test/indent/python/paragraph-break-indented/out4
-rw-r--r--test/indent/python/paragraph-break-indented/rc3
-rw-r--r--test/indent/python/paragraph-break/cmd1
-rw-r--r--test/indent/python/paragraph-break/in4
-rw-r--r--test/indent/python/paragraph-break/out5
-rw-r--r--test/indent/python/paragraph-break/rc3
32 files changed, 86 insertions, 0 deletions
diff --git a/test/indent/python/empty-start-of-file-indented/cmd b/test/indent/python/empty-start-of-file-indented/cmd
new file mode 100644
index 00000000..60ee9918
--- /dev/null
+++ b/test/indent/python/empty-start-of-file-indented/cmd
@@ -0,0 +1 @@
+gjA<ret>
diff --git a/test/indent/python/empty-start-of-file-indented/in b/test/indent/python/empty-start-of-file-indented/in
new file mode 100644
index 00000000..641ef36f
--- /dev/null
+++ b/test/indent/python/empty-start-of-file-indented/in
@@ -0,0 +1 @@
+ #
diff --git a/test/indent/python/empty-start-of-file-indented/out b/test/indent/python/empty-start-of-file-indented/out
new file mode 100644
index 00000000..fee7ebff
--- /dev/null
+++ b/test/indent/python/empty-start-of-file-indented/out
@@ -0,0 +1,2 @@
+ #
+ #
diff --git a/test/indent/python/empty-start-of-file-indented/rc b/test/indent/python/empty-start-of-file-indented/rc
new file mode 100644
index 00000000..a098fc21
--- /dev/null
+++ b/test/indent/python/empty-start-of-file-indented/rc
@@ -0,0 +1,3 @@
+source "%val{runtime}/colors/default.kak"
+source "%val{runtime}/rc/filetype/python.kak"
+set buffer filetype python
diff --git a/test/indent/python/empty-start-of-file/cmd b/test/indent/python/empty-start-of-file/cmd
new file mode 100644
index 00000000..60ee9918
--- /dev/null
+++ b/test/indent/python/empty-start-of-file/cmd
@@ -0,0 +1 @@
+gjA<ret>
diff --git a/test/indent/python/empty-start-of-file/in b/test/indent/python/empty-start-of-file/in
new file mode 100644
index 00000000..792d6005
--- /dev/null
+++ b/test/indent/python/empty-start-of-file/in
@@ -0,0 +1 @@
+#
diff --git a/test/indent/python/empty-start-of-file/out b/test/indent/python/empty-start-of-file/out
new file mode 100644
index 00000000..0f3b43f3
--- /dev/null
+++ b/test/indent/python/empty-start-of-file/out
@@ -0,0 +1,2 @@
+#
+#
diff --git a/test/indent/python/empty-start-of-file/rc b/test/indent/python/empty-start-of-file/rc
new file mode 100644
index 00000000..a098fc21
--- /dev/null
+++ b/test/indent/python/empty-start-of-file/rc
@@ -0,0 +1,3 @@
+source "%val{runtime}/colors/default.kak"
+source "%val{runtime}/rc/filetype/python.kak"
+set buffer filetype python
diff --git a/test/indent/python/exit-block-indented/cmd b/test/indent/python/exit-block-indented/cmd
new file mode 100644
index 00000000..60ee9918
--- /dev/null
+++ b/test/indent/python/exit-block-indented/cmd
@@ -0,0 +1 @@
+gjA<ret>
diff --git a/test/indent/python/exit-block-indented/in b/test/indent/python/exit-block-indented/in
new file mode 100644
index 00000000..0092d9ec
--- /dev/null
+++ b/test/indent/python/exit-block-indented/in
@@ -0,0 +1,4 @@
+ # A new line after a pair of empty comment lines should exit the
+ # block comment.
+ #
+ #
diff --git a/test/indent/python/exit-block-indented/out b/test/indent/python/exit-block-indented/out
new file mode 100644
index 00000000..36283e91
--- /dev/null
+++ b/test/indent/python/exit-block-indented/out
@@ -0,0 +1,3 @@
+ # A new line after a pair of empty comment lines should exit the
+ # block comment.
+
diff --git a/test/indent/python/exit-block-indented/rc b/test/indent/python/exit-block-indented/rc
new file mode 100644
index 00000000..a098fc21
--- /dev/null
+++ b/test/indent/python/exit-block-indented/rc
@@ -0,0 +1,3 @@
+source "%val{runtime}/colors/default.kak"
+source "%val{runtime}/rc/filetype/python.kak"
+set buffer filetype python
diff --git a/test/indent/python/exit-block/cmd b/test/indent/python/exit-block/cmd
new file mode 100644
index 00000000..60ee9918
--- /dev/null
+++ b/test/indent/python/exit-block/cmd
@@ -0,0 +1 @@
+gjA<ret>
diff --git a/test/indent/python/exit-block/in b/test/indent/python/exit-block/in
new file mode 100644
index 00000000..582a11c7
--- /dev/null
+++ b/test/indent/python/exit-block/in
@@ -0,0 +1,4 @@
+# A new line after a pair of empty comment lines should exit the
+# block comment.
+#
+#
diff --git a/test/indent/python/exit-block/out b/test/indent/python/exit-block/out
new file mode 100644
index 00000000..21bc5075
--- /dev/null
+++ b/test/indent/python/exit-block/out
@@ -0,0 +1,3 @@
+# A new line after a pair of empty comment lines should exit the
+# block comment.
+
diff --git a/test/indent/python/exit-block/rc b/test/indent/python/exit-block/rc
new file mode 100644
index 00000000..a098fc21
--- /dev/null
+++ b/test/indent/python/exit-block/rc
@@ -0,0 +1,3 @@
+source "%val{runtime}/colors/default.kak"
+source "%val{runtime}/rc/filetype/python.kak"
+set buffer filetype python
diff --git a/test/indent/python/not-a-comment-indented/cmd b/test/indent/python/not-a-comment-indented/cmd
new file mode 100644
index 00000000..60ee9918
--- /dev/null
+++ b/test/indent/python/not-a-comment-indented/cmd
@@ -0,0 +1 @@
+gjA<ret>
diff --git a/test/indent/python/not-a-comment-indented/in b/test/indent/python/not-a-comment-indented/in
new file mode 100644
index 00000000..f3c7955e
--- /dev/null
+++ b/test/indent/python/not-a-comment-indented/in
@@ -0,0 +1,4 @@
+ # If we're not in a comment at all, make sure we do the right thing.
+ # (one empty line and a 4-space prefixed line follows)
+
+
diff --git a/test/indent/python/not-a-comment-indented/out b/test/indent/python/not-a-comment-indented/out
new file mode 100644
index 00000000..9748afb0
--- /dev/null
+++ b/test/indent/python/not-a-comment-indented/out
@@ -0,0 +1,5 @@
+ # If we're not in a comment at all, make sure we do the right thing.
+ # (one empty line and a 4-space prefixed line follows)
+
+
+
diff --git a/test/indent/python/not-a-comment-indented/rc b/test/indent/python/not-a-comment-indented/rc
new file mode 100644
index 00000000..a098fc21
--- /dev/null
+++ b/test/indent/python/not-a-comment-indented/rc
@@ -0,0 +1,3 @@
+source "%val{runtime}/colors/default.kak"
+source "%val{runtime}/rc/filetype/python.kak"
+set buffer filetype python
diff --git a/test/indent/python/not-a-comment/cmd b/test/indent/python/not-a-comment/cmd
new file mode 100644
index 00000000..60ee9918
--- /dev/null
+++ b/test/indent/python/not-a-comment/cmd
@@ -0,0 +1 @@
+gjA<ret>
diff --git a/test/indent/python/not-a-comment/in b/test/indent/python/not-a-comment/in
new file mode 100644
index 00000000..bdfda4a1
--- /dev/null
+++ b/test/indent/python/not-a-comment/in
@@ -0,0 +1,4 @@
+# If we're not in a comment at all, make sure we do the right thing.
+# (two empty lines follow)
+
+
diff --git a/test/indent/python/not-a-comment/out b/test/indent/python/not-a-comment/out
new file mode 100644
index 00000000..881aeaa0
--- /dev/null
+++ b/test/indent/python/not-a-comment/out
@@ -0,0 +1,5 @@
+# If we're not in a comment at all, make sure we do the right thing.
+# (two empty lines follow)
+
+
+
diff --git a/test/indent/python/not-a-comment/rc b/test/indent/python/not-a-comment/rc
new file mode 100644
index 00000000..a098fc21
--- /dev/null
+++ b/test/indent/python/not-a-comment/rc
@@ -0,0 +1,3 @@
+source "%val{runtime}/colors/default.kak"
+source "%val{runtime}/rc/filetype/python.kak"
+set buffer filetype python
diff --git a/test/indent/python/paragraph-break-indented/cmd b/test/indent/python/paragraph-break-indented/cmd
new file mode 100644
index 00000000..60ee9918
--- /dev/null
+++ b/test/indent/python/paragraph-break-indented/cmd
@@ -0,0 +1 @@
+gjA<ret>
diff --git a/test/indent/python/paragraph-break-indented/in b/test/indent/python/paragraph-break-indented/in
new file mode 100644
index 00000000..fb95ee15
--- /dev/null
+++ b/test/indent/python/paragraph-break-indented/in
@@ -0,0 +1,3 @@
+ # A new line after a single empty comment line should leave the comment in
+ # place as a possible paragraph separator.
+ #
diff --git a/test/indent/python/paragraph-break-indented/out b/test/indent/python/paragraph-break-indented/out
new file mode 100644
index 00000000..31a0fc7e
--- /dev/null
+++ b/test/indent/python/paragraph-break-indented/out
@@ -0,0 +1,4 @@
+ # A new line after a single empty comment line should leave the comment in
+ # place as a possible paragraph separator.
+ #
+ #
diff --git a/test/indent/python/paragraph-break-indented/rc b/test/indent/python/paragraph-break-indented/rc
new file mode 100644
index 00000000..a098fc21
--- /dev/null
+++ b/test/indent/python/paragraph-break-indented/rc
@@ -0,0 +1,3 @@
+source "%val{runtime}/colors/default.kak"
+source "%val{runtime}/rc/filetype/python.kak"
+set buffer filetype python
diff --git a/test/indent/python/paragraph-break/cmd b/test/indent/python/paragraph-break/cmd
new file mode 100644
index 00000000..60ee9918
--- /dev/null
+++ b/test/indent/python/paragraph-break/cmd
@@ -0,0 +1 @@
+gjA<ret>
diff --git a/test/indent/python/paragraph-break/in b/test/indent/python/paragraph-break/in
new file mode 100644
index 00000000..c856556f
--- /dev/null
+++ b/test/indent/python/paragraph-break/in
@@ -0,0 +1,4 @@
+# A new line after a single empty comment line should leave the empty comment
+# in place as a possible paragraph separator, starting a new comment with the
+# prefix copied.
+#
diff --git a/test/indent/python/paragraph-break/out b/test/indent/python/paragraph-break/out
new file mode 100644
index 00000000..56da68fd
--- /dev/null
+++ b/test/indent/python/paragraph-break/out
@@ -0,0 +1,5 @@
+# A new line after a single empty comment line should leave the empty comment
+# in place as a possible paragraph separator, starting a new comment with the
+# prefix copied.
+#
+#
diff --git a/test/indent/python/paragraph-break/rc b/test/indent/python/paragraph-break/rc
new file mode 100644
index 00000000..a098fc21
--- /dev/null
+++ b/test/indent/python/paragraph-break/rc
@@ -0,0 +1,3 @@
+source "%val{runtime}/colors/default.kak"
+source "%val{runtime}/rc/filetype/python.kak"
+set buffer filetype python