aboutsummaryrefslogtreecommitdiffstats
path: root/t/t4018
diff options
context:
space:
mode:
authorRodrigo Carvalho <rodrigorsdc@gmail.com>2025-05-29 19:16:41 -0300
committerJunio C Hamano <gitster@pobox.com>2025-05-29 15:29:37 -0700
commit1d9526df8d6ebe69efc54ade9d4ed2317342fdba (patch)
tree85d83e081ef82348cc7eb1db2cb307153dd8c223 /t/t4018
parentMerge branch 'master' of https://github.com/j6t/git-gui (diff)
downloadgit-1d9526df8d6ebe69efc54ade9d4ed2317342fdba.tar.gz
git-1d9526df8d6ebe69efc54ade9d4ed2317342fdba.zip
userdiff: add support for R programming language
Add userdiff patterns to support R programming language. Also, add three userdiff tests for R programming language files. These files define simple function and nested function, with and without indentation. Signed-off-by: Rodrigo Carvalho <rodrigorsdc@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4018')
-rw-r--r--t/t4018/r-indent6
-rw-r--r--t/t4018/r-indent-nested10
-rw-r--r--t/t4018/r-noindent6
3 files changed, 22 insertions, 0 deletions
diff --git a/t/t4018/r-indent b/t/t4018/r-indent
new file mode 100644
index 0000000000..9df440f2a4
--- /dev/null
+++ b/t/t4018/r-indent
@@ -0,0 +1,6 @@
+RIGHT <- function(a, b) {
+ c = mean(a, b)
+ d = c + 2
+ ChangeMe()
+ return (d)
+}
diff --git a/t/t4018/r-indent-nested b/t/t4018/r-indent-nested
new file mode 100644
index 0000000000..30412e6c79
--- /dev/null
+++ b/t/t4018/r-indent-nested
@@ -0,0 +1,10 @@
+LEFT = function(a, b) {
+ c = mean(a, b)
+ RIGHT = function(d, e) {
+ f = var(d, e)
+ g = f + 1
+ ChangeMe()
+ return (g)
+ }
+ return (RIGHT(2, 3))
+}
diff --git a/t/t4018/r-noindent b/t/t4018/r-noindent
new file mode 100644
index 0000000000..6d9b01ffe3
--- /dev/null
+++ b/t/t4018/r-noindent
@@ -0,0 +1,6 @@
+RIGHT <- function(a, b) {
+c = mean(a, b)
+d = c + 2
+ChangeMe()
+return (c)
+}