C Library Functions - unit_test_system (3)
NAME
unit_test_system(3f) - [M_framework__verify] return status from
system command
(LICENSE:PD)
CONTENTS
Synopsis
Description
Options
Examples
Author
License
SYNOPSIS
function unit_test_system(cmd,verbose)
character(len=*),intent(in) :: cmd
logical,intent(in),optional :: verbose
DESCRIPTION
unit_test_system(3f) executes a system command and returns the
exit status of the command.
OPTIONS
|
command |
| |
system command to execute. If it starts with "* " the
asterisk is replaced by the name of the current command.
If it starts with "** " the asterisks are replaced by
the current command including arguments.
|
|
verbose |
| |
if .true. the executed command is echoed to output. The
default is .false.
|
|
EXAMPLES
Sample program:
program demo_unit_test_system
use M_framework, only: &
unit_test_start, &
unit_test, &
unit_test_system, &
unit_test_end
implicit none
if (command_argument_count() == 0) then
call unit_test_start(myroutine)
call unit_test(false, unit_test_system(false) == 0, check false)
call unit_test(true, unit_test_system(true) == 0, check true)
call unit_test(notthere, unit_test_system(notthere) == 0, &
& check notthere)
call unit_test(*,&
& unit_test_system(* and options, verbose=.true.) == 0, check "*")
call unit_test_end(myroutine)
else
write (*, *) called with an option
endif
end program demo_unit_test_system
AUTHOR
John S. Urban
LICENSE
Public Domain
| Nemo Release 3.1 | unit_test_system (3) | June 29, 2025 |
Generated by manServer 1.08 from 5e489b9b-1c4c-4df0-83d3-d603fa7092dd using man macros.