mirror of
https://github.com/sasjs/core.git
synced 2026-01-06 17:10:05 +00:00
feat: ms_testservice.sas macro for testing services on sasjs/server
This commit is contained in:
@@ -55,37 +55,28 @@ run;
|
||||
outlib=testlib1,
|
||||
outref=test1
|
||||
)
|
||||
|
||||
%global test1a test1b test1c test1d;
|
||||
%let test1=FAIL;
|
||||
data _null_;
|
||||
infile test1;
|
||||
input;
|
||||
putlog _n_ _infile_;
|
||||
if _infile_=', "somedata1":' then call symputx('test1a','PASS');
|
||||
if _infile_='{"X":1 ,"Y":" t\"w\"o" ,"Z":"Z" }' then
|
||||
call symputx('test1b','PASS');
|
||||
if _infile_='], "somedata2":' then call symputx('test1c','PASS');
|
||||
if _infile_='{"X":1 ,"Y":" t\"w\"o" ,"Z":"Z" }' then
|
||||
call symputx('test1d','PASS');
|
||||
set testlib1.somedata1;
|
||||
if x=1 and y=' t"w"o' and z="Z" then call symputx('test1','PASS');
|
||||
putlog (_all_)(=);
|
||||
run;
|
||||
|
||||
%let test2=FAIL;
|
||||
data _null_;
|
||||
set testlib1.somedata2;
|
||||
if x=1 and y=' t"w"o' and z="Z" then call symputx('test2','PASS');
|
||||
putlog (_all_)(=);
|
||||
run;
|
||||
|
||||
|
||||
%mp_assert(
|
||||
iftrue=(&test1a=PASS),
|
||||
desc=Test 1 table 1 name,
|
||||
iftrue=(&test1=PASS),
|
||||
desc=somedata1 created correctly,
|
||||
outds=work.test_results
|
||||
)
|
||||
%mp_assert(
|
||||
iftrue=(&test1b=PASS),
|
||||
desc=Test 1 table 1 values,
|
||||
iftrue=(&test2=PASS),
|
||||
desc=somedata2 created correctly,
|
||||
outds=work.test_results
|
||||
)
|
||||
%mp_assert(
|
||||
iftrue=(&test1c=PASS),
|
||||
desc=Test 1 table 2 name,
|
||||
outds=work.test_results
|
||||
)
|
||||
%mp_assert(
|
||||
iftrue=(&test1d=PASS),
|
||||
desc=Test 1 table 2 values,
|
||||
outds=work.test_results
|
||||
)
|
||||
Reference in New Issue
Block a user