Pergunta

i'm new to specman. how do i use the output_from() function. and what does it do?

Foi útil?

Solução

6.1.1 docs say:

25.8.4 output_from()

Purpose:

Collect the results of a system call

Category

Routine

Syntax :

output_from(command: string): list of string 

Syntax Example

log_list = output_from("ls *log"); 

Parameter

command

A single operating system command, with or without parameters and enclosed in double quotes.

Description:

Executes the string as an operating system command and returns the output as a list of string. Under UNIX, stdout and stderr go to the string list.

Example

<' 
extend sys { 
    m1() is { 
        var log_list: list of string; 
        log_list = output_from("ls *log"); 
        print log_list; 
    }; 
}; 
'> 
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top