Build and parse test cli.
subroutine cli_parse()
!< Build and parse test cli.
type(command_line_interface) :: cli !< Test command line interface.
real(R8P) :: factor_(3) !< Vectorial factor.
integer(I4P) :: error !< Error trapping flag.
call cli%init(progname='fossil_test_resize', &
authors='S. Zaghi', &
help='Usage: ', &
examples=["fossil_test_resize --stl src/tests/dragon.stl"], &
epilog=new_line('a')//"all done")
call cli%add(switch='--stl', &
help='STL (input) file name', &
required=.false., &
def='src/tests/cube.stl', &
act='store')
call cli%add(switch='--factor', &
help='vectorial factor', &
required=.false., &
nargs='+', &
def='2.0 2.0 2.0', &
act='store')
call cli%add(switch='--x', &
help='factor x', &
required=.false., &
def='2.0', &
act='store')
call cli%add(switch='--y', &
help='factor y', &
required=.false., &
def='2.0', &
act='store')
call cli%add(switch='--z', &
help='factor z', &
required=.false., &
def='2.0', &
act='store')
call cli%parse(error=error) ; if (error/=0) stop
call cli%get(switch='--stl', val=file_name_stl, error=error) ; if (error/=0) stop
call cli%get(switch='--factor', val=factor_, error=error) ; if (error/=0) stop
call cli%get(switch='--x', val=x, error=error) ; if (error/=0) stop
call cli%get(switch='--y', val=y, error=error) ; if (error/=0) stop
call cli%get(switch='--z', val=z, error=error) ; if (error/=0) stop
factor%x = factor_(1)
factor%y = factor_(2)
factor%z = factor_(3)
endsubroutine cli_parse