20filename stpcode1 temp;
23 put
'%put hello world;';
25 put
'data _null_; file _webout1; put "triggerstp test 1";run;';
27filename stpcode2 temp;
30 put
'%put Lorem Ipsum;';
32 put
'data _null_; file _webout2; put "triggerstp test 2";run;';
35%let fname1=%mf_getuniquename();
36%let fname2=%mf_getuniquename();
38%ms_createfile(/sasjs/tests/&fname1..sas
42%ms_createfile(/sasjs/tests/&fname2..sas
46%mp_assertscope(SNAPSHOT)
47 %ms_triggerstp(/sasjs/tests/&fname1
49 ,outds=work.mySessions
51 %ms_triggerstp(/sasjs/tests/&fname2
52 ,outds=work.mySessions
54%mp_assertscope(COMPARE,ignorelist=MCLIB0_JADP1LEN MCLIB0_JADPNUM
55 MCLIB0_JADVLEN MC0_JADP1LEN MC0_JADPNUM MC0_JADVLEN
58%mp_assert(iftrue=%str(%mf_existds(work.mySessions)=1)
59 ,desc=Testing output exists
60 ,outds=work.test_results
63%mp_assertdsobs(work.mySessions,
65 desc=Testing observations,
66 outds=work.test_results
68%mp_assertcols(work.mySessions,
71 desc=Testing column exists,
72 outds=work.test_results
76 retain contentCheck 1;
77 set work.mySessions end=last;
78 if missing(sessionID) then contentCheck = 0;
80 call symputx("contentCheck",contentCheck,"l");
83%let typeCheck = %mf_getvartype(work.mySessions,sessionid);
85%mp_assert(iftrue=%str(&typeCheck = C and &contentCheck = 1)
86 ,desc=Testing type and content of output
87 ,outds=work.test_results
90%ms_deletefile(/sasjs/tests/&fname1..sas)
91%ms_deletefile(/sasjs/tests/&fname2..sas)