diff options
author | Laurence Kedward <laurence.kedward@bristol.ac.uk> | 2021-06-09 09:26:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-09 09:26:18 +0100 |
commit | e6688d07c5658b1a26354be7d7aea68231679f05 (patch) | |
tree | 04e72e50158108e5fd71ae0e3fdfbef1edca5a66 /test | |
parent | 2ba3478e7d79dc8bb0598485346740b5436fe914 (diff) | |
parent | 302782c036fc498dc3739c79fb34a814295f41e5 (diff) | |
download | fpm-e6688d07c5658b1a26354be7d7aea68231679f05.tar.gz fpm-e6688d07c5658b1a26354be7d7aea68231679f05.zip |
Merge pull request #490 from LKedward/fix-module-parsing
Fix module parsing
Diffstat (limited to 'test')
-rw-r--r-- | test/fpm_test/test_source_parsing.f90 | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/test/fpm_test/test_source_parsing.f90 b/test/fpm_test/test_source_parsing.f90 index 79a4d7a..12fc419 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,21 @@ 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()', & + & 'string = " &', & + & 'module name"', & + & 'string = " &', & + & 'module name !"', & + & 'end function i', & & 'end module test' close(unit) @@ -712,7 +725,7 @@ contains open(file=temp_file, newunit=unit) write(unit, '(a)') & - & 'module :: my_mod', & + & 'module ::my_mod', & & 'end module test' close(unit) @@ -721,8 +734,6 @@ contains return end if - write(*,*) '"',f_source%modules_used(1)%s,'"' - end subroutine test_invalid_module |