mirror of
https://github.com/sasjs/core.git
synced 2026-01-18 14:00:05 +00:00
feat: finishing mp_formats and adding a test, including prefix in mp_init, allowing mp_sortinplace to work when there is no primary key, sand other small fixes
This commit is contained in:
@@ -61,4 +61,42 @@ run;
|
||||
checkvals=work.check.val,
|
||||
desc=All values have a match,
|
||||
test=ALLVALS
|
||||
)
|
||||
|
||||
/* Test for when there are no actual changes */
|
||||
data work.orig work.deleted work.changed work.appended;
|
||||
set sashelp.class;
|
||||
output work.orig;
|
||||
run;
|
||||
%mp_storediffs(sashelp.class,work.orig,NAME
|
||||
,delds=work.deleted
|
||||
,modds=work.changed
|
||||
,appds=work.appended
|
||||
,outds=work.final2
|
||||
,mdebug=1
|
||||
)
|
||||
%mp_assertdsobs(work.final2,
|
||||
desc=No changes produces 0 records,
|
||||
test=EQUALS 0,
|
||||
outds=work.test_results
|
||||
)
|
||||
|
||||
/* Test for deletes only */
|
||||
data work.orig work.deleted work.changed work.appended;
|
||||
set sashelp.class;
|
||||
output work.orig;
|
||||
if _n_>5 then output work.deleted;
|
||||
run;
|
||||
|
||||
%mp_storediffs(sashelp.class,work.orig,NAME
|
||||
,delds=work.deleted
|
||||
,modds=work.changed
|
||||
,appds=work.appended
|
||||
,outds=work.final3
|
||||
,mdebug=1
|
||||
)
|
||||
%mp_assertdsobs(work.final3,
|
||||
desc=Delete has 70 records,
|
||||
test=EQUALS 70,
|
||||
outds=work.test_results
|
||||
)
|
||||
Reference in New Issue
Block a user