1
0
mirror of https://github.com/sasjs/core.git synced 2026-01-05 00:20:05 +00:00

fix: refreshed the testing toolkit, added debug options, updated documentation, included one new test (mv_getjobcode.sas)

This commit is contained in:
Allan Bowe
2021-05-08 23:27:55 +03:00
parent 298acc4e50
commit 4e564b5409
12 changed files with 691 additions and 248 deletions

View File

@@ -18,20 +18,20 @@ data _null_;
file testref;
put '01'x;
run;
%put TEST1: creating web service;
%mv_createwebservice(
path=&mcTestAppLoc/temp/macros,
code=testref,
name=mv_createwebservice
name=mv_createwebservice,
code=testref
)
filename compare temp;
%put TEST1: fetching web service code;
%mv_getjobcode(
path=&mcTestAppLoc/temp/macros
,name=mv_createwebservice
,outref=compare;
path=&mcTestAppLoc/temp/macros,
name=mv_createwebservice,
outref=compare
)
data test_results;
%put TEST1: checking web service code;
data work.test_results;
length test_description $256 test_result $4 test_comments $256;
infile compare end=eof;
input;

View File

@@ -0,0 +1,49 @@
/**
@file
@brief Testing mv_getjobcode macro
<h4> SAS Macros </h4>
@li mp_assert.sas
@li mv_createjob.sas
@li mv_getjobcode.sas
**/
/**
* Test Case 1
*/
/* write some code to a job */
%let incode=%str(data test; set sashelp.class;run;);
filename testref temp;
data _null_;
file testref;
put "&incode";
run;
%mv_createjob(
code=testref,
path=&mcTestAppLoc/services/temp,
name=some_job
)
/* now get the code back */
%mv_getjobcode(
path=&mcTestAppLoc/services/temp,
name=some_job,
outref=mycode
)
%let diditexist=NO;
data work.test1;
infile mycode;
input;
putlog _infile_;
line=_infile_;
check=symget('incode');
if _infile_=symget('incode') then call symputx('diditexist','YES');
run;
%mp_assert(
iftrue=(&diditexist=NO),
desc=Check if the code that was sent was successfully retrieved
)