Implement Fortran doctest feature
It will work similarly to Python: one can have code like the following in Fortran comments:
! >>> use utils, only: f
! >>> f(5)
! 10
And it will discover such blocks and execute them and check that the result (10
in the example above) agrees with the command (f(5)
).
This will allow Fortran code to be documented with examples of usage (and tested to ensure it actually works), just like in Python.