aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/cli_test/cli_test.f904
-rw-r--r--test/fpm_test/test_manifest.f9014
-rw-r--r--test/fpm_test/test_source_parsing.f9023
3 files changed, 26 insertions, 15 deletions
diff --git a/test/cli_test/cli_test.f90 b/test/cli_test/cli_test.f90
index d979f1a..e23afde 100644
--- a/test/cli_test/cli_test.f90
+++ b/test/cli_test/cli_test.f90
@@ -53,7 +53,7 @@ character(len=*),parameter :: tests(*)= [ character(len=256) :: &
'CMD="run proj1 p2 project3 --profile debug", NAME="proj1","p2","project3",profile="debug",', &
'CMD="run proj1 p2 project3 --profile release", NAME="proj1","p2","project3",profile="release",', &
'CMD="run proj1 p2 project3 --profile release -- arg1 -x ""and a long one""", &
- &NAME="proj1","p2","project3",profile="release",ARGS="""arg1"" -x ""and a long one""", ', &
+ &NAME="proj1","p2","project3",profile="release",ARGS="""arg1"" ""-x"" ""and a long one""", ', &
'CMD="test", ', &
'CMD="test my_project", NAME="my_project", ', &
@@ -61,7 +61,7 @@ character(len=*),parameter :: tests(*)= [ character(len=256) :: &
'CMD="test proj1 p2 project3 --profile debug", NAME="proj1","p2","project3",profile="debug",', &
'CMD="test proj1 p2 project3 --profile release", NAME="proj1","p2","project3",profile="release",', &
'CMD="test proj1 p2 project3 --profile release -- arg1 -x ""and a long one""", &
- &NAME="proj1","p2","project3",profile="release" ARGS="""arg1"" -x ""and a long one""", ', &
+ &NAME="proj1","p2","project3",profile="release" ARGS="""arg1"" ""-x"" ""and a long one""", ', &
'CMD="build", NAME= profile="",ARGS="",', &
'CMD="build --profile release", NAME= profile="release",ARGS="",', &
diff --git a/test/fpm_test/test_manifest.f90 b/test/fpm_test/test_manifest.f90
index 94e5e07..69c86fd 100644
--- a/test/fpm_test/test_manifest.f90
+++ b/test/fpm_test/test_manifest.f90
@@ -658,7 +658,7 @@ contains
call add_table(children, child, stat)
call set_value(child, 'name', '"tester"', stat)
- call new_package(package, table, error)
+ call new_package(package, table, error=error)
end subroutine test_package_simple
@@ -676,7 +676,7 @@ contains
call new_table(table)
- call new_package(package, table, error)
+ call new_package(package, table, error=error)
end subroutine test_package_empty
@@ -697,7 +697,7 @@ contains
call new_table(table)
call add_array(table, "name", child, stat)
- call new_package(package, table, error)
+ call new_package(package, table, error=error)
end subroutine test_package_typeerror
@@ -720,7 +720,7 @@ contains
call add_table(table, "dev-dependencies", child, stat)
call add_table(table, "dependencies", child, stat)
- call new_package(package, table, error)
+ call new_package(package, table, error=error)
end subroutine test_package_noname
@@ -743,7 +743,7 @@ contains
call add_array(table, 'executable', children, stat)
call add_array(children, children2, stat)
- call new_package(package, table, error)
+ call new_package(package, table, error=error)
end subroutine test_package_wrongexe
@@ -766,7 +766,7 @@ contains
call add_array(table, 'test', children, stat)
call add_array(children, children2, stat)
- call new_package(package, table, error)
+ call new_package(package, table, error=error)
end subroutine test_package_wrongtest
@@ -793,7 +793,7 @@ contains
call add_table(children, child, stat)
call set_value(child, 'name', '"prog"', stat)
- call new_package(package, table, error)
+ call new_package(package, table, error=error)
end subroutine test_package_duplicate
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