File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,24 @@ subroutine test_check_fortran_source_runs(error)
51
51
call test_failed(error, " Cannot run Fortran hello world" )
52
52
return
53
53
end if
54
+
55
+ ! > Test with invalid flags
56
+ if (compiler% check_fortran_source_runs(" print *, 'Hello world!'; end" , &
57
+ link_flags= " -some-really-invalid-link-flag" )) then
58
+ call test_failed(error, " Invalid link flags did not trigger an error" )
59
+ return
60
+ end if
61
+ if (compiler% check_fortran_source_runs(" print *, 'Hello world!'; end" , &
62
+ compile_flags= " -certainly-not-a-build/flag" )) then
63
+ call test_failed(error, " Invalid compile flags did not trigger an error" )
64
+ return
65
+ end if
66
+ if (compiler% check_fortran_source_runs(" print *, 'Hello world!'; end" , &
67
+ compile_flags= " -certainly-not-a-build/flag" , &
68
+ link_flags= " -some-really-invalid-link-flag" )) then
69
+ call test_failed(error, " Invalid build and link flags did not trigger an error" )
70
+ return
71
+ end if
54
72
55
73
end subroutine test_check_fortran_source_runs
56
74
You can’t perform that action at this time.
0 commit comments