Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
mv_createjob.test.sas
Go to the documentation of this file.
1/**
2 @file
3 @brief Testing mv_createjob macro
4
5 <h4> SAS Macros </h4>
6 @li mf_nobs.sas
7 @li mp_assert.sas
8 @li mp_assertscope.sas
9 @li mv_createjob.sas
10 @li mv_getfoldermembers.sas
11
12**/
13
14%let path=&mcTestAppLoc/jobs;
15
16filename ft15f001 temp;
17data _null_;
18 file ft15f001;
19 put 'data work.createdbyjob;';
20 put ' x=1;';
21 put 'run;';
22run;
23
24/* the JSON libname engine publishes five globals per libref when it parses a
25 REST response, and the libref numbers are fixed because each test runs in a
26 fresh session. They are listed so the comparison covers the macro's own
27 variables. */
28%mp_assertscope(SNAPSHOT)
29%mv_createjob(path=&path, name=createjob)
30%mp_assertscope(COMPARE,
31 desc=mv_createjob does not leak scope,
32 ignorelist=MC0_JADP1LEN MC0_JADP2LEN MC0_JADP3LEN MC0_JADPNUM MC0_JADVLEN
33 MC1_JADP1LEN MC1_JADP2LEN MC1_JADP3LEN MC1_JADPNUM MC1_JADVLEN
34 MC2_JADP1LEN MC2_JADP2LEN MC2_JADP3LEN MC2_JADPNUM MC2_JADVLEN
35 MC3_JADP1LEN MC3_JADP2LEN MC3_JADP3LEN MC3_JADPNUM MC3_JADVLEN
36 MC4_JADP1LEN MC4_JADP2LEN MC4_JADP3LEN MC4_JADPNUM MC4_JADVLEN,
37 outds=work.test_results
38)
39
40%mv_getfoldermembers(root=&path, outds=work.jobmembers)
41
42%mp_assert(
43 iftrue=(%mf_nobs(work.jobmembers)=1),
44 desc=Check the job definition was created in the target folder
45)