설명
이는 슬롯 무료체험의 다양한 설정에서 올바른 동작을 테스트합니다. 슬롯 무료체험(슬롯 무료체험=0) 호출, 실행, 넣기 및 에코 명령에 대한 제한 값(누적): 0 모든 것이 허용됨 $call 및 실행 명령의 대화형 셸 1개는 금지됩니다. 2 모든 $call 및 실행 명령은 금지됩니다. 3 $echo 또는 put 명령은 작업 디렉터리 또는 스크래치 디렉터리 아래에만 쓸 수 있습니다. 4 $echo 및 put 명령은 허용되지 않습니다. 기고자: Lutz Westermann, 2014년 12월
소형 모델 유형 :슬롯 무료체험
카테고리 : 슬롯 무료체험 테스트 라이브러리
메인 파일 : execmode01.gms
$title '슬롯 무료체험 동작 테스트' (EXECMODE01,SEQ=673)
$onText
이는 슬롯 무료체험에 대한 다양한 설정에서 올바른 동작을 테스트합니다.
슬롯 무료체험(슬롯 무료체험=0) 호출, 실행, 넣기 및 에코 명령에 대한 제한
값(누적):
0 모든 것이 허용됨
$call 및 실행 명령의 대화형 셸 1개는 금지됩니다.
2 모든 $call 및 실행 명령은 금지됩니다.
3 $echo 또는 put 명령은 작업 디렉터리 또는 스크래치 디렉터리 아래에만 쓸 수 있습니다.
4 $echo 및 put 명령은 허용되지 않습니다.
기고자: Lutz Westermann, 2014년 12월
$offText
$onEcho > okWithEM0a.gms
$call
$offEcho
$onEcho > okWithEM0b.gms
''을 실행;
$offEcho
$onEcho > okWithEM1a.gms
$call touch dummy.gms
$offEcho
$onEcho > okWithEM1b.gms
'touch dummy.gms'를 실행합니다.
$offEcho
$onEcho > okWithEM1c.gms
파일 FX
put_utility fx 'exec' / 'touch dummy.gms';
$offEcho
$onEcho > okWithEM1d.gms
파일 FX
put_utility fx 'shell' / 'touch dummy.gms';
$offEcho
*모든 하위 폴더에서 실행된다고 가정
$onEcho > okWithEM2a.gms
$echo 테스트 > ..%system.dirsep%dummy.txt
$offEcho
$onEcho > okWithEM2b.gms
파일 fy /'..%system.dirsep%dummy.txt'/
putclose fy '테스트';
$offEcho
$onEcho > okWithEM3a.gms
$echo 테스트 > dummy.txt
$offEcho
$onEcho > okWithEM3b.gms
파일 fz /'dummy.txt'/;
putclose fz '테스트';
$offEcho
em 슬롯 무료체험 설정 / 0*4 /
* 0은 스크립트 테스트에서 문제가 되는 대화형 쉘을 허용하므로 사용하지 마십시오.
emR(em) 실행할 execModes / 1*4 /
TC 테스트 케이스 / a*d /
emtcMap(em,tc) / 0.(a,b)
1.(a*d)
2.(a,b)
3.(a,b) /;
싱글톤 세트 activeOuter(em)
활성 내부(em)
activeTestCase(tc);
별칭(em,aem);
파일 FX;
루프(emtcMap(em,tc),
activeOuter(em) = 예;
activeTestCase(tc) = 예;
루프(emR(aem),
activeInner(aem) = 예;
put_utility fx 'exec' / 'gams okWithEM' em.tl:0 tc.tl:0 '.gms lo=%GAMS.lo% 슬롯 무료체험=' aem.tl:0 ;
if(ord(aem) <= ord(em),
if(동일(em,'2'),
'=test -e ..%system.dirsep%dummy.txt'를 실행합니다.);
if(동일(em,'3'),
'=test -e dummy.txt'를 실행합니다);
abort$( errorlevel) '실패하면 안 됩니다.', activeOuter, activeTestCase, activeInner;
if(동일(em,'2'),
'rm -rf ..%system.dirsep%dummy.txt'를 실행합니다.);
if(동일(em,'3'),
'rm -rf dummy.txt'를 실행합니다.);
그렇지 않으면
if(동일(em,'2'),
'=test -e ..%system.dirsep%dummy.txt'를 실행합니다.);
if(동일(em,'3'),
'=test -e dummy.txt'를 실행합니다);
abort$(not errorlevel) '이것은 실패했어야 했습니다.', activeOuter, activeTestCase, activeInner;
)
)
)