aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLKedward <laurence.kedward@bristol.ac.uk>2021-06-05 14:18:08 +0100
committerLKedward <laurence.kedward@bristol.ac.uk>2021-06-05 14:18:08 +0100
commit5566c16f184a20080238fcc731a4d1f039d9d29c (patch)
tree47e4cb5dc30a1f8e5af46414944e31ac5aa02963 /test
parent845217f13a23de91021ba393ef432d68683af282 (diff)
downloadfpm-5566c16f184a20080238fcc731a4d1f039d9d29c.tar.gz
fpm-5566c16f184a20080238fcc731a4d1f039d9d29c.zip
Add: failing test for module stmt parsing
Diffstat (limited to 'test')
-rw-r--r--test/fpm_test/test_source_parsing.f9019
1 files changed, 13 insertions, 6 deletions
diff --git a/test/fpm_test/test_source_parsing.f90 b/test/fpm_test/test_source_parsing.f90
index 79a4d7a..fb23030 100644
--- a/test/fpm_test/test_source_parsing.f90
+++ b/test/fpm_test/test_source_parsing.f90
@@ -309,7 +309,7 @@ contains
open(file=temp_file, newunit=unit)
write(unit, '(a)') &
- & 'module my_mod', &
+ & 'module my_mod ! A trailing comment', &
& 'use module_one', &
& 'interface', &
& ' module subroutine f()', &
@@ -320,8 +320,17 @@ contains
& 'program =1', &
& 'program (i) =1', &
& 'contains', &
- & 'module procedure f()', &
- & 'end procedure f', &
+ & 'module subroutine&', &
+ & ' e()', &
+ & 'end subroutine e', &
+ & 'module subroutine f()', &
+ & 'end subroutine f', &
+ & 'module function g()', &
+ & 'end function g', &
+ & 'module integer function h()', &
+ & 'end function h()', &
+ & 'module real function i()', &
+ & 'end function i()', &
& 'end module test'
close(unit)
@@ -712,7 +721,7 @@ contains
open(file=temp_file, newunit=unit)
write(unit, '(a)') &
- & 'module :: my_mod', &
+ & 'module ::my_mod', &
& 'end module test'
close(unit)
@@ -721,8 +730,6 @@ contains
return
end if
- write(*,*) '"',f_source%modules_used(1)%s,'"'
-
end subroutine test_invalid_module