Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-08-20 02:14:50 +0300
committerJunio C Hamano <gitster@pobox.com>2020-08-20 02:14:50 +0300
commitb350c4debe28b1df205f6127b1afe5b0168e7226 (patch)
tree1271762c7a6830559ab48726a9a99277690cacc4 /t
parentecc796caa237d5f31807a6fa445b64770aea3aa5 (diff)
parent75c3b6b2e8a72239fa23e039c46f9a5cf8c24142 (diff)
Merge branch 'pb/userdiff-fortran-update'
The regexp to identify the function boundary for FORTRAN programs has been updated. * pb/userdiff-fortran-update: userdiff: improve Fortran xfuncname regex userdiff: add tests for Fortran xfuncname regex
Diffstat (limited to 't')
-rw-r--r--t/t4018/fortran-block-data5
-rw-r--r--t/t4018/fortran-comment13
-rw-r--r--t/t4018/fortran-comment-keyword14
-rw-r--r--t/t4018/fortran-comment-legacy13
-rw-r--r--t/t4018/fortran-comment-legacy-star13
-rw-r--r--t/t4018/fortran-external-function9
-rw-r--r--t/t4018/fortran-external-subroutine5
-rw-r--r--t/t4018/fortran-module5
-rw-r--r--t/t4018/fortran-module-procedure13
-rw-r--r--t/t4018/fortran-program5
10 files changed, 95 insertions, 0 deletions
diff --git a/t/t4018/fortran-block-data b/t/t4018/fortran-block-data
new file mode 100644
index 0000000000..63d4e21d0a
--- /dev/null
+++ b/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/t/t4018/fortran-comment b/t/t4018/fortran-comment
new file mode 100644
index 0000000000..7b10d17658
--- /dev/null
+++ b/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/t/t4018/fortran-comment-keyword b/t/t4018/fortran-comment-keyword
new file mode 100644
index 0000000000..e9206a5379
--- /dev/null
+++ b/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/t/t4018/fortran-comment-legacy b/t/t4018/fortran-comment-legacy
new file mode 100644
index 0000000000..53cd062c1e
--- /dev/null
+++ b/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/t/t4018/fortran-comment-legacy-star b/t/t4018/fortran-comment-legacy-star
new file mode 100644
index 0000000000..2cbcdc3d8a
--- /dev/null
+++ b/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/t/t4018/fortran-external-function b/t/t4018/fortran-external-function
new file mode 100644
index 0000000000..5a2d85d3aa
--- /dev/null
+++ b/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/t/t4018/fortran-external-subroutine b/t/t4018/fortran-external-subroutine
new file mode 100644
index 0000000000..4ce85fea13
--- /dev/null
+++ b/t/t4018/fortran-external-subroutine
@@ -0,0 +1,5 @@
+subroutine RIGHT
+
+real ChangeMe
+
+end subroutine RIGHT
diff --git a/t/t4018/fortran-module b/t/t4018/fortran-module
new file mode 100644
index 0000000000..c4b737dac3
--- /dev/null
+++ b/t/t4018/fortran-module
@@ -0,0 +1,5 @@
+module RIGHT
+
+use ChangeMe
+
+end module RIGHT
diff --git a/t/t4018/fortran-module-procedure b/t/t4018/fortran-module-procedure
new file mode 100644
index 0000000000..1ce6d854c2
--- /dev/null
+++ b/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/t/t4018/fortran-program b/t/t4018/fortran-program
new file mode 100644
index 0000000000..4616895e4b
--- /dev/null
+++ b/t/t4018/fortran-program
@@ -0,0 +1,5 @@
+program RIGHT
+
+call ChangeMe
+
+end program RIGHT