about summary refs log tree commit diff
path: root/third_party/git/t/t4018
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-05-22T16·46+0100
committerVincent Ambo <tazjin@google.com>2020-05-22T16·46+0100
commit5229c9b232de5bfa959ad6ebbb4c8192ac513352 (patch)
tree8539e7e23682cac110900f946f034ae44162cacd /third_party/git/t/t4018
parentf2b211131f2347342dde63975b09cf603149f1a3 (diff)
parent8518a7a51faaf50f830646d4c3585f51236b9349 (diff)
merge(3p/git): Merge git upstream at v2.26.2 r/808
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/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
26 files changed, 179 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 0000000000..b21ef8737b
--- /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 0000000000..c5287d9141
--- /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 0000000000..5a4334bb16
--- /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 0000000000..afc6b5b404
--- /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 0000000000..559dfce9b3
--- /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 0000000000..27e9718b31
--- /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 0000000000..072d58b69d
--- /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 0000000000..8f0c87d863
--- /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 0000000000..4353b8220c
--- /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 0000000000..333a625c70
--- /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 0000000000..fae08ba7e8
--- /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 0000000000..0560a2b697
--- /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 0000000000..d452f495a7
--- /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 0000000000..4f925e9ad4
--- /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 0000000000..91a4e7aa20
--- /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 0000000000..c9910d0675
--- /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 0000000000..771ebc5c42
--- /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 0000000000..1aabe33b7a
--- /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 0000000000..7d9173691e
--- /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 0000000000..f9234bbfc4
--- /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/python-async-def b/third_party/git/t/t4018/python-async-def
new file mode 100644
index 0000000000..87640e03d2
--- /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 0000000000..ba9e741430
--- /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 0000000000..e50b31b0ad
--- /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 0000000000..f5d03258af
--- /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 0000000000..19b4f35c4c
--- /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 0000000000..208fbadd2b
--- /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,
+        ]