output01.gms : 테스트 출력 관련 명령줄 매개변수

설명

명령줄 매개변수 출력의 예상 동작을 테스트하고 출력을 작성합니다.

기고자: Lutz Westermann, 2023년 3월

소형 모델 유형 :슬롯 커뮤니티


카테고리 : 슬롯 커뮤니티 테스트 라이브러리


메인 파일 : output01.gms

$title '테스트 출력 관련 명령줄 매개변수 (OUTPUT01,SEQ=935)

$onText
명령줄 매개변수 출력의 예상 동작을 테스트하고 출력을 작성합니다.

기고자: Lutz Westermann, 2023년 3월
$offText

$call.checkErrorLevel rm -rf test.lst test.lxi otherFile.txt
$if 존재하는 경우 test.lst $abort WorkDir이 깨끗하지 않음
$if 존재하는 경우 test.lxi $abort WorkDir이 깨끗하지 않음
$if 존재하는 경우 otherFile.txt $abort WorkDir이 깨끗하지 않음

$echo $log가 뭔가를 했습니다 > test.gms

$call.checkErrorLevel 슬롯 커뮤니티 test.gms lo=%슬롯 커뮤니티lo%
$if NOT 존재 test.lst $abort 기본 실행으로 test.lst 예상
$ifexist test.lxi $abort test.lxi가 기본 실행으로 예상되지 않았습니다.

$call.checkErrorLevel rm -rf 테스트.lst
$if 존재하는 경우 test.lst $abort WorkDir이 깨끗하지 않음

$call.checkErrorLevel 슬롯 커뮤니티 test.gms IDE=1 lo=%슬롯 커뮤니티lo%
$if NOT 존재 test.lst $abort IDE 실행 시 test.lst 예상
$if NOT 존재 test.lxi $abort IDE 실행 시 test.lxi 예상

$call.checkErrorLevel 슬롯 커뮤니티 test.gms lo=%슬롯 커뮤니티lo%
$if NOT 존재 test.lst $abort 기본 실행으로 test.lst 예상
$if 존재 test.lxi $abort test.lxi가 기본 실행으로 예상되지 않음 - 이전에 존재했더라도

$call.checkErrorLevel rm -rf 테스트.lst
$if 존재하는 경우 test.lst $abort WorkDir이 깨끗하지 않음

$call.checkErrorLevel 슬롯 커뮤니티 test.gms lo=%슬롯 커뮤니티lo% 출력=otherFile.txt
$if 존재 test.lst $abort test.lst가 출력=otherFile.txt일 것으로 예상하지 않았습니다.
$ 존재하지 않는 경우 otherFile.txt $abort 출력=otherFile.txt인 otherFile.txt가 필요합니다.

$call.checkErrorLevel rm -rf otherFile.txt
$if 존재하는 경우 otherFile.txt $abort WorkDir이 깨끗하지 않음

$call.checkErrorLevel 슬롯 커뮤니티 test.gms lo=%슬롯 커뮤니티lo% writeOutput=0
$ifexist test.lst $abort writeOutput=0인 test.lst를 예상하지 않았습니다.

$call.checkErrorLevel 슬롯 커뮤니티 test.gms lo=%슬롯 커뮤니티lo% writeOutput=0 출력=otherFile.txt
$ifexist test.lst $abort writeOutput=0 및 output=otherFile.txt인 test.lst를 예상하지 않았습니다.
$if otherFile.txt $abort writeOutput=0 및 output=otherFile.txt인 otherFile.txt를 기대하지 않았습니다.