mirror of
https://github.com/sasjs/core.git
synced 2026-01-07 09:30:06 +00:00
fix: failing test due to missing sashelp table, also added scope check
This commit is contained in:
@@ -7,23 +7,35 @@
|
|||||||
@li mp_assertcols.sas
|
@li mp_assertcols.sas
|
||||||
@li mp_assertcolvals.sas
|
@li mp_assertcolvals.sas
|
||||||
@li mp_assertdsobs.sas
|
@li mp_assertdsobs.sas
|
||||||
|
@li mp_assertscope.sas
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
|
||||||
/* valid filter */
|
/* make some data */
|
||||||
%mp_getcols(sashelp.airline,outds=work.info)
|
proc sql;
|
||||||
|
create table work.src(
|
||||||
|
SOME_DATETIME float format=datetime19.,
|
||||||
|
SOME_CHAR char(16),
|
||||||
|
SOME_NUM num,
|
||||||
|
SOME_TIME num format=time8.,
|
||||||
|
SOME_DATE num format=date9.
|
||||||
|
);
|
||||||
|
|
||||||
|
/* run macro, checking for scope leakage */
|
||||||
|
%mp_assertscope(SNAPSHOT)
|
||||||
|
%mp_getcols(work.src,outds=work.info)
|
||||||
|
%mp_assertscope(COMPARE)
|
||||||
|
|
||||||
%mp_assertdsobs(work.info,
|
%mp_assertdsobs(work.info,
|
||||||
desc=Has 3 records,
|
desc=Has 5 records,
|
||||||
test=EQUALS 3,
|
test=EQUALS 5,
|
||||||
outds=work.test_results
|
outds=work.test_results
|
||||||
)
|
)
|
||||||
|
|
||||||
data work.check;
|
data work.check;
|
||||||
length val $10;
|
length val $10;
|
||||||
do val='NUMERIC','DATE','CHARACTER';
|
do val='NUMERIC','DATE','CHARACTER','DATETIME','TIME';
|
||||||
output;
|
output;
|
||||||
end;
|
end;
|
||||||
run;
|
run;
|
||||||
|
|||||||
Reference in New Issue
Block a user