diff options
-rw-r--r-- | fpm/test/test_source_parsing.f90 | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/fpm/test/test_source_parsing.f90 b/fpm/test/test_source_parsing.f90 index c55a206..eec92d7 100644 --- a/fpm/test/test_source_parsing.f90 +++ b/fpm/test/test_source_parsing.f90 @@ -308,7 +308,7 @@ contains open(file=temp_file, newunit=unit) write(unit, '(a)') & - & 'submodule (parent) :: child', & + & 'submodule (parent) child', & & 'use module_one', & & 'end submodule test' close(unit) @@ -323,8 +323,8 @@ contains return end if - if (size(f_source%modules_provided) /= 0) then - call test_failed(error,'Unexpected modules_provided - expecting zero') + if (size(f_source%modules_provided) /= 1) then + call test_failed(error,'Unexpected modules_provided - expecting one') return end if @@ -333,6 +333,11 @@ contains return end if + if (.not.('child' .in. f_source%modules_provided)) then + call test_failed(error,'Missing module in modules_provided') + return + end if + if (.not.('module_one' .in. f_source%modules_used)) then call test_failed(error,'Missing module in modules_used') return @@ -360,7 +365,7 @@ contains open(file=temp_file, newunit=unit) write(unit, '(a)') & - & 'submodule (ancestor:parent) :: child', & + & 'submodule (ancestor:parent) child', & & 'use module_one', & & 'end submodule test' close(unit) @@ -375,8 +380,8 @@ contains return end if - if (size(f_source%modules_provided) /= 0) then - call test_failed(error,'Unexpected modules_provided - expecting zero') + if (size(f_source%modules_provided) /= 1) then + call test_failed(error,'Unexpected modules_provided - expecting one') return end if @@ -385,6 +390,11 @@ contains return end if + if (.not.('child' .in. f_source%modules_provided)) then + call test_failed(error,'Missing module in modules_provided') + return + end if + if (.not.('module_one' .in. f_source%modules_used)) then call test_failed(error,'Missing module in modules_used') return |