about summary refs log tree commit diff
path: root/third_party/git/t/t4018
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/git/t/t4018')
-rw-r--r--third_party/git/t/t4018/dts-labels9
-rw-r--r--third_party/git/t/t4018/dts-node-unitless8
-rw-r--r--third_party/git/t/t4018/dts-nodes8
-rw-r--r--third_party/git/t/t4018/dts-nodes-boolean-prop9
-rw-r--r--third_party/git/t/t4018/dts-nodes-comment18
-rw-r--r--third_party/git/t/t4018/dts-nodes-comment28
-rw-r--r--third_party/git/t/t4018/dts-nodes-multiline-prop13
-rw-r--r--third_party/git/t/t4018/dts-reference9
-rw-r--r--third_party/git/t/t4018/dts-root5
-rw-r--r--third_party/git/t/t4018/dts-root-comment8
-rw-r--r--third_party/git/t/t4018/elixir-do-not-pick-end5
-rw-r--r--third_party/git/t/t4018/elixir-ex-unit-test6
-rw-r--r--third_party/git/t/t4018/elixir-function5
-rw-r--r--third_party/git/t/t4018/elixir-macro5
-rw-r--r--third_party/git/t/t4018/elixir-module9
-rw-r--r--third_party/git/t/t4018/elixir-module-func8
-rw-r--r--third_party/git/t/t4018/elixir-nested-module9
-rw-r--r--third_party/git/t/t4018/elixir-private-function5
-rw-r--r--third_party/git/t/t4018/elixir-protocol6
-rw-r--r--third_party/git/t/t4018/elixir-protocol-implementation5
-rw-r--r--third_party/git/t/t4018/fortran-block-data5
-rw-r--r--third_party/git/t/t4018/fortran-comment13
-rw-r--r--third_party/git/t/t4018/fortran-comment-keyword14
-rw-r--r--third_party/git/t/t4018/fortran-comment-legacy13
-rw-r--r--third_party/git/t/t4018/fortran-comment-legacy-star13
-rw-r--r--third_party/git/t/t4018/fortran-external-function9
-rw-r--r--third_party/git/t/t4018/fortran-external-subroutine5
-rw-r--r--third_party/git/t/t4018/fortran-module5
-rw-r--r--third_party/git/t/t4018/fortran-module-procedure13
-rw-r--r--third_party/git/t/t4018/fortran-program5
-rw-r--r--third_party/git/t/t4018/markdown-heading-indented6
-rw-r--r--third_party/git/t/t4018/markdown-heading-non-headings17
-rw-r--r--third_party/git/t/t4018/python-async-def4
-rw-r--r--third_party/git/t/t4018/python-class4
-rw-r--r--third_party/git/t/t4018/python-def4
-rw-r--r--third_party/git/t/t4018/python-indented-async-def7
-rw-r--r--third_party/git/t/t4018/python-indented-class5
-rw-r--r--third_party/git/t/t4018/python-indented-def7
38 files changed, 297 insertions, 0 deletions
diff --git a/third_party/git/t/t4018/dts-labels b/third_party/git/t/t4018/dts-labels
new file mode 100644
index 000000000000..b21ef8737bb8
--- /dev/null
+++ b/third_party/git/t/t4018/dts-labels
@@ -0,0 +1,9 @@
+/ {
+	label_1: node1@ff00 {
+		label2: RIGHT {
+			vendor,some-property;
+
+			ChangeMe = <0x45-30>;
+		};
+	};
+};
diff --git a/third_party/git/t/t4018/dts-node-unitless b/third_party/git/t/t4018/dts-node-unitless
new file mode 100644
index 000000000000..c5287d91416e
--- /dev/null
+++ b/third_party/git/t/t4018/dts-node-unitless
@@ -0,0 +1,8 @@
+/ {
+	label_1: node1 {
+		RIGHT {
+			prop-array = <1>, <4>;
+			ChangeMe = <0xffeedd00>;
+		};
+	};
+};
diff --git a/third_party/git/t/t4018/dts-nodes b/third_party/git/t/t4018/dts-nodes
new file mode 100644
index 000000000000..5a4334bb1645
--- /dev/null
+++ b/third_party/git/t/t4018/dts-nodes
@@ -0,0 +1,8 @@
+/ {
+	label_1: node1@ff00 {
+		RIGHT@deadf00,4000 {
+			#size-cells = <1>;
+			ChangeMe = <0xffeedd00>;
+		};
+	};
+};
diff --git a/third_party/git/t/t4018/dts-nodes-boolean-prop b/third_party/git/t/t4018/dts-nodes-boolean-prop
new file mode 100644
index 000000000000..afc6b5b404e4
--- /dev/null
+++ b/third_party/git/t/t4018/dts-nodes-boolean-prop
@@ -0,0 +1,9 @@
+/ {
+	label_1: node1@ff00 {
+		RIGHT@deadf00,4000 {
+			boolean-prop1;
+
+			ChangeMe;
+		};
+	};
+};
diff --git a/third_party/git/t/t4018/dts-nodes-comment1 b/third_party/git/t/t4018/dts-nodes-comment1
new file mode 100644
index 000000000000..559dfce9b308
--- /dev/null
+++ b/third_party/git/t/t4018/dts-nodes-comment1
@@ -0,0 +1,8 @@
+/ {
+	label_1: node1@ff00 {
+		RIGHT@deadf00,4000 /* &a comment */ {
+			#size-cells = <1>;
+			ChangeMe = <0xffeedd00>;
+		};
+	};
+};
diff --git a/third_party/git/t/t4018/dts-nodes-comment2 b/third_party/git/t/t4018/dts-nodes-comment2
new file mode 100644
index 000000000000..27e9718b31cf
--- /dev/null
+++ b/third_party/git/t/t4018/dts-nodes-comment2
@@ -0,0 +1,8 @@
+/ {
+	label_1: node1@ff00 {
+		RIGHT@deadf00,4000 { /* a trailing comment */ 
+			#size-cells = <1>;
+			ChangeMe = <0xffeedd00>;
+		};
+	};
+};
diff --git a/third_party/git/t/t4018/dts-nodes-multiline-prop b/third_party/git/t/t4018/dts-nodes-multiline-prop
new file mode 100644
index 000000000000..072d58b69dc2
--- /dev/null
+++ b/third_party/git/t/t4018/dts-nodes-multiline-prop
@@ -0,0 +1,13 @@
+/ {
+	label_1: node1@ff00 {
+		RIGHT@deadf00,4000 {
+			multilineprop = <3>,
+					<4>,
+					<5>,
+					<6>,
+					<7>;
+
+			ChangeMe = <0xffeedd00>;
+		};
+	};
+};
diff --git a/third_party/git/t/t4018/dts-reference b/third_party/git/t/t4018/dts-reference
new file mode 100644
index 000000000000..8f0c87d8637f
--- /dev/null
+++ b/third_party/git/t/t4018/dts-reference
@@ -0,0 +1,9 @@
+&label_1 {
+	TEST = <455>;
+};
+
+&RIGHT {
+	vendor,some-property;
+
+	ChangeMe = <0x45-30>;
+};
diff --git a/third_party/git/t/t4018/dts-root b/third_party/git/t/t4018/dts-root
new file mode 100644
index 000000000000..4353b8220c91
--- /dev/null
+++ b/third_party/git/t/t4018/dts-root
@@ -0,0 +1,5 @@
+/ { RIGHT /* Technically just supposed to be a slash and brace */
+	#size-cells = <1>;
+
+	ChangeMe = <0xffeedd00>;
+};
diff --git a/third_party/git/t/t4018/dts-root-comment b/third_party/git/t/t4018/dts-root-comment
new file mode 100644
index 000000000000..333a625c7007
--- /dev/null
+++ b/third_party/git/t/t4018/dts-root-comment
@@ -0,0 +1,8 @@
+/ { RIGHT /* Technically just supposed to be a slash and brace */
+	#size-cells = <1>;
+
+	/* This comment should be ignored */
+
+	some-property = <40+2>;
+	ChangeMe = <0xffeedd00>;
+};
diff --git a/third_party/git/t/t4018/elixir-do-not-pick-end b/third_party/git/t/t4018/elixir-do-not-pick-end
new file mode 100644
index 000000000000..fae08ba7e8cb
--- /dev/null
+++ b/third_party/git/t/t4018/elixir-do-not-pick-end
@@ -0,0 +1,5 @@
+defmodule RIGHT do
+end
+#
+#
+# ChangeMe; do not pick up 'end' line
diff --git a/third_party/git/t/t4018/elixir-ex-unit-test b/third_party/git/t/t4018/elixir-ex-unit-test
new file mode 100644
index 000000000000..0560a2b69718
--- /dev/null
+++ b/third_party/git/t/t4018/elixir-ex-unit-test
@@ -0,0 +1,6 @@
+defmodule Test do
+  test "RIGHT" do
+    assert true == true
+    assert ChangeMe
+  end
+end
diff --git a/third_party/git/t/t4018/elixir-function b/third_party/git/t/t4018/elixir-function
new file mode 100644
index 000000000000..d452f495a7e0
--- /dev/null
+++ b/third_party/git/t/t4018/elixir-function
@@ -0,0 +1,5 @@
+def function(RIGHT, arg) do
+  # comment
+  # comment
+  ChangeMe
+end
diff --git a/third_party/git/t/t4018/elixir-macro b/third_party/git/t/t4018/elixir-macro
new file mode 100644
index 000000000000..4f925e9ad463
--- /dev/null
+++ b/third_party/git/t/t4018/elixir-macro
@@ -0,0 +1,5 @@
+defmacro foo(RIGHT) do
+  # Code
+  # Code
+  ChangeMe
+end
diff --git a/third_party/git/t/t4018/elixir-module b/third_party/git/t/t4018/elixir-module
new file mode 100644
index 000000000000..91a4e7aa2000
--- /dev/null
+++ b/third_party/git/t/t4018/elixir-module
@@ -0,0 +1,9 @@
+defmodule RIGHT do
+  @moduledoc """
+  Foo bar
+  """
+
+  def ChangeMe(a) where is_map(a) do
+    a
+  end
+end
diff --git a/third_party/git/t/t4018/elixir-module-func b/third_party/git/t/t4018/elixir-module-func
new file mode 100644
index 000000000000..c9910d067513
--- /dev/null
+++ b/third_party/git/t/t4018/elixir-module-func
@@ -0,0 +1,8 @@
+defmodule Foo do
+  def fun(RIGHT) do
+     # Code
+     # Code
+     # Code
+     ChangeMe
+  end
+end
diff --git a/third_party/git/t/t4018/elixir-nested-module b/third_party/git/t/t4018/elixir-nested-module
new file mode 100644
index 000000000000..771ebc5c42a9
--- /dev/null
+++ b/third_party/git/t/t4018/elixir-nested-module
@@ -0,0 +1,9 @@
+defmodule MyApp.RIGHT do
+  @moduledoc """
+  Foo bar
+  """
+
+  def ChangeMe(a) where is_map(a) do
+    a
+  end
+end
diff --git a/third_party/git/t/t4018/elixir-private-function b/third_party/git/t/t4018/elixir-private-function
new file mode 100644
index 000000000000..1aabe33b7a9a
--- /dev/null
+++ b/third_party/git/t/t4018/elixir-private-function
@@ -0,0 +1,5 @@
+defp function(RIGHT, arg) do
+  # comment
+  # comment
+  ChangeMe
+end
diff --git a/third_party/git/t/t4018/elixir-protocol b/third_party/git/t/t4018/elixir-protocol
new file mode 100644
index 000000000000..7d9173691e32
--- /dev/null
+++ b/third_party/git/t/t4018/elixir-protocol
@@ -0,0 +1,6 @@
+defprotocol RIGHT do
+  @doc """
+  Calculates the size (and not the length!) of a data structure
+  """
+  def size(data, ChangeMe)
+end
diff --git a/third_party/git/t/t4018/elixir-protocol-implementation b/third_party/git/t/t4018/elixir-protocol-implementation
new file mode 100644
index 000000000000..f9234bbfc489
--- /dev/null
+++ b/third_party/git/t/t4018/elixir-protocol-implementation
@@ -0,0 +1,5 @@
+defimpl RIGHT do
+  # Docs
+  # Docs
+  def foo(ChangeMe), do: :ok
+end
diff --git a/third_party/git/t/t4018/fortran-block-data b/third_party/git/t/t4018/fortran-block-data
new file mode 100644
index 000000000000..63d4e21d0ad1
--- /dev/null
+++ b/third_party/git/t/t4018/fortran-block-data
@@ -0,0 +1,5 @@
+       BLOCK DATA RIGHT
+       
+       COMMON /B/ C, ChangeMe
+       DATA C, ChangeMe  / 2.0, 6.0 / 
+       END 
diff --git a/third_party/git/t/t4018/fortran-comment b/third_party/git/t/t4018/fortran-comment
new file mode 100644
index 000000000000..7b10d1765885
--- /dev/null
+++ b/third_party/git/t/t4018/fortran-comment
@@ -0,0 +1,13 @@
+      module a
+
+      contains
+
+      ! subroutine wrong
+      subroutine RIGHT
+      ! subroutine wrong
+
+      real ChangeMe
+
+      end subroutine RIGHT
+
+      end module a
diff --git a/third_party/git/t/t4018/fortran-comment-keyword b/third_party/git/t/t4018/fortran-comment-keyword
new file mode 100644
index 000000000000..e9206a53799d
--- /dev/null
+++ b/third_party/git/t/t4018/fortran-comment-keyword
@@ -0,0 +1,14 @@
+      module a
+
+      contains
+
+      subroutine RIGHT (funcA, funcB)
+
+      real funcA  ! grid function a
+      real funcB  ! grid function b
+
+      real ChangeMe
+
+      end subroutine RIGHT
+
+      end module a
diff --git a/third_party/git/t/t4018/fortran-comment-legacy b/third_party/git/t/t4018/fortran-comment-legacy
new file mode 100644
index 000000000000..53cd062c1e5f
--- /dev/null
+++ b/third_party/git/t/t4018/fortran-comment-legacy
@@ -0,0 +1,13 @@
+      module a
+
+      contains
+
+C subroutine wrong
+      subroutine RIGHT
+C subroutine wrong
+
+      real ChangeMe
+
+      end subroutine RIGHT
+
+      end module a
diff --git a/third_party/git/t/t4018/fortran-comment-legacy-star b/third_party/git/t/t4018/fortran-comment-legacy-star
new file mode 100644
index 000000000000..2cbcdc3d8ab9
--- /dev/null
+++ b/third_party/git/t/t4018/fortran-comment-legacy-star
@@ -0,0 +1,13 @@
+      module a
+
+      contains
+
+* subroutine wrong
+      subroutine RIGHT
+* subroutine wrong
+
+      real ChangeMe
+
+      end subroutine RIGHT
+
+      end module a
diff --git a/third_party/git/t/t4018/fortran-external-function b/third_party/git/t/t4018/fortran-external-function
new file mode 100644
index 000000000000..5a2d85d3aa41
--- /dev/null
+++ b/third_party/git/t/t4018/fortran-external-function
@@ -0,0 +1,9 @@
+function RIGHT(a, b) result(c)
+
+integer, intent(in) :: ChangeMe
+integer, intent(in) :: b
+integer, intent(out) :: c
+
+c = a+b
+
+end function RIGHT
diff --git a/third_party/git/t/t4018/fortran-external-subroutine b/third_party/git/t/t4018/fortran-external-subroutine
new file mode 100644
index 000000000000..4ce85fea1324
--- /dev/null
+++ b/third_party/git/t/t4018/fortran-external-subroutine
@@ -0,0 +1,5 @@
+subroutine RIGHT
+
+real ChangeMe
+
+end subroutine RIGHT
diff --git a/third_party/git/t/t4018/fortran-module b/third_party/git/t/t4018/fortran-module
new file mode 100644
index 000000000000..c4b737dac3f1
--- /dev/null
+++ b/third_party/git/t/t4018/fortran-module
@@ -0,0 +1,5 @@
+module RIGHT
+
+use ChangeMe
+
+end module RIGHT
diff --git a/third_party/git/t/t4018/fortran-module-procedure b/third_party/git/t/t4018/fortran-module-procedure
new file mode 100644
index 000000000000..1ce6d854c22b
--- /dev/null
+++ b/third_party/git/t/t4018/fortran-module-procedure
@@ -0,0 +1,13 @@
+ module RIGHT
+
+   implicit none
+   private
+
+   interface letters  ! generic interface
+      module procedure aaaa, &
+                       bbbb, &
+                       ChangeMe, &
+                       dddd
+   end interface
+   
+end module RIGHT
diff --git a/third_party/git/t/t4018/fortran-program b/third_party/git/t/t4018/fortran-program
new file mode 100644
index 000000000000..4616895e4b56
--- /dev/null
+++ b/third_party/git/t/t4018/fortran-program
@@ -0,0 +1,5 @@
+program RIGHT
+
+call ChangeMe
+
+end program RIGHT
diff --git a/third_party/git/t/t4018/markdown-heading-indented b/third_party/git/t/t4018/markdown-heading-indented
new file mode 100644
index 000000000000..1991c2bd4569
--- /dev/null
+++ b/third_party/git/t/t4018/markdown-heading-indented
@@ -0,0 +1,6 @@
+Indented headings are allowed, as long as the indent is no more than 3 spaces.
+
+   ### RIGHT
+
+- something
+- ChangeMe
diff --git a/third_party/git/t/t4018/markdown-heading-non-headings b/third_party/git/t/t4018/markdown-heading-non-headings
new file mode 100644
index 000000000000..c479c1a3f1e2
--- /dev/null
+++ b/third_party/git/t/t4018/markdown-heading-non-headings
@@ -0,0 +1,17 @@
+Headings can be right next to other lines of the file:
+# RIGHT
+Indents of four or more spaces make a code block:
+
+    # code comment, not heading
+
+If there's no space after the final hash, it's not a heading:
+
+#hashtag
+
+Sequences of more than 6 hashes don't make a heading:
+
+####### over-enthusiastic heading
+
+So the detected heading should be right up at the start of this file.
+
+ChangeMe
diff --git a/third_party/git/t/t4018/python-async-def b/third_party/git/t/t4018/python-async-def
new file mode 100644
index 000000000000..87640e03d213
--- /dev/null
+++ b/third_party/git/t/t4018/python-async-def
@@ -0,0 +1,4 @@
+async def RIGHT(pi: int = 3.14):
+    while True:
+        break
+    return ChangeMe()
diff --git a/third_party/git/t/t4018/python-class b/third_party/git/t/t4018/python-class
new file mode 100644
index 000000000000..ba9e741430f2
--- /dev/null
+++ b/third_party/git/t/t4018/python-class
@@ -0,0 +1,4 @@
+class RIGHT(int, str):
+    # comment
+    # another comment
+    # ChangeMe
diff --git a/third_party/git/t/t4018/python-def b/third_party/git/t/t4018/python-def
new file mode 100644
index 000000000000..e50b31b0ad5e
--- /dev/null
+++ b/third_party/git/t/t4018/python-def
@@ -0,0 +1,4 @@
+def RIGHT(pi: int = 3.14):
+    while True:
+        break
+    return ChangeMe()
diff --git a/third_party/git/t/t4018/python-indented-async-def b/third_party/git/t/t4018/python-indented-async-def
new file mode 100644
index 000000000000..f5d03258af4d
--- /dev/null
+++ b/third_party/git/t/t4018/python-indented-async-def
@@ -0,0 +1,7 @@
+class Foo:
+    async def RIGHT(self, x: int):
+        return [
+            1,
+            2,
+            ChangeMe,
+        ]
diff --git a/third_party/git/t/t4018/python-indented-class b/third_party/git/t/t4018/python-indented-class
new file mode 100644
index 000000000000..19b4f35c4ca1
--- /dev/null
+++ b/third_party/git/t/t4018/python-indented-class
@@ -0,0 +1,5 @@
+if TYPE_CHECKING:
+    class RIGHT:
+        # comment
+        # another comment
+        # ChangeMe
diff --git a/third_party/git/t/t4018/python-indented-def b/third_party/git/t/t4018/python-indented-def
new file mode 100644
index 000000000000..208fbadd2be6
--- /dev/null
+++ b/third_party/git/t/t4018/python-indented-def
@@ -0,0 +1,7 @@
+class Foo:
+    def RIGHT(self, x: int):
+        return [
+            1,
+            2,
+            ChangeMe,
+        ]