diff options
Diffstat (limited to 'test cases/fortran/2 modules')
-rw-r--r-- | test cases/fortran/2 modules/comment_mod.f90 | 6 | ||||
-rw-r--r-- | test cases/fortran/2 modules/meson.build | 9 | ||||
-rw-r--r-- | test cases/fortran/2 modules/mymod.F90 | 8 | ||||
-rw-r--r-- | test cases/fortran/2 modules/prog.f90 | 11 |
4 files changed, 34 insertions, 0 deletions
diff --git a/test cases/fortran/2 modules/comment_mod.f90 b/test cases/fortran/2 modules/comment_mod.f90 new file mode 100644 index 0000000..917f6be --- /dev/null +++ b/test cases/fortran/2 modules/comment_mod.f90 @@ -0,0 +1,6 @@ +module line ! inline comment +implicit none + +real :: length + +end module line diff --git a/test cases/fortran/2 modules/meson.build b/test cases/fortran/2 modules/meson.build new file mode 100644 index 0000000..c9bfd8d --- /dev/null +++ b/test cases/fortran/2 modules/meson.build @@ -0,0 +1,9 @@ +project('modules', 'fortran', + default_options : ['default_library=static']) + +commented = library('commented', 'comment_mod.f90') + +# Have one file with an upper case file extension. +e = executable('modprog', 'mymod.F90', 'prog.f90', + link_with: commented) +test('moduletest', e) diff --git a/test cases/fortran/2 modules/mymod.F90 b/test cases/fortran/2 modules/mymod.F90 new file mode 100644 index 0000000..a45f5c9 --- /dev/null +++ b/test cases/fortran/2 modules/mymod.F90 @@ -0,0 +1,8 @@ +! module circle to be sure module regex doesn't allow commented modules + +module circle +implicit none + +real, parameter :: pi = 4.*atan(1.) +real :: radius +end module circle diff --git a/test cases/fortran/2 modules/prog.f90 b/test cases/fortran/2 modules/prog.f90 new file mode 100644 index 0000000..ef72d11 --- /dev/null +++ b/test cases/fortran/2 modules/prog.f90 @@ -0,0 +1,11 @@ +program main +use circle, only: pi +use line, only: length +implicit none + +print *,'pi=',pi + +length = pi +print *, length + +end program |