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

fix: adding test and data logic for re-applying modified records where base table has missing vars

This commit is contained in:
munja
2022-01-21 11:51:47 +01:00
parent dd94215c3b
commit 9cf2cc3c96
2 changed files with 65 additions and 2 deletions

View File

@@ -21,7 +21,7 @@ data work.orig work.deleted work.changed work.appended;
end;
else if _n_ le 20 then do;
output work.orig;
age=99;
coal=ranuni(1)*-1;
output work.changed;
end;
else if _n_ le 30 then do;
@@ -186,5 +186,38 @@ run;
test=EQUALS 10
)
/**
* Modifications test - where base table has missing vars
*/
data work.final7;
set work.final;
drop Coal;
run;
%mp_stackdiffs(work.orig
,work.final7
,CUSTOMER YEAR
,mdebug=1
,errds=work.errds7
,outmod=work.mod7
,outadd=work.add7
,outdel=work.del7
)
%mp_assertdsobs(work.errds7,
desc=Mod7 - 10 errors,
test=EQUALS 10
)
%mp_assertdsobs(work.Mod7,
desc=Mod7 - 0 records populated (structure change relevant),
test=EQUALS 0
)
%mp_assertdsobs(work.add7,
desc=add7 - 0 records populated ,
test=EQUALS 0
)
%mp_assertdsobs(work.del7,
desc=del7 - 0 records populated ,
test=EQUALS 0
)
%mp_assertscope(COMPARE,Desc=MacVar Scope Check)