문제

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

도움이 되었습니까?

해결책

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; 
    }; 
}; 
'> 
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top