Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
mv_getgroups.test.sas
Go to the documentation of this file.
1/**
2 @file
3 @brief Testing mv_getgroups macro
4
5 <h4> SAS Macros </h4>
6 @li mf_existvar.sas
7 @li mf_nobs.sas
8 @li mp_assert.sas
9 @li mp_assertscope.sas
10 @li mv_getgroups.sas
11
12**/
13
14/* the JSON libname engine publishes five globals per libref when it parses a
15 REST response, and the libref numbers are fixed because each test runs in a
16 fresh session. They are listed so the comparison covers the macro's own
17 variables. */
18%mp_assertscope(SNAPSHOT)
19%mv_getgroups(outds=work.viyagroups)
20%mp_assertscope(COMPARE,
21 desc=mv_getgroups does not leak scope,
22 ignorelist=MC0_JADP1LEN MC0_JADP2LEN MC0_JADP3LEN MC0_JADPNUM MC0_JADVLEN,
23 outds=work.test_results
24)
25
26%mp_assert(
27 iftrue=(%sysfunc(exist(work.viyagroups))=1),
28 desc=Check the groups dataset was created
29)
30%mp_assert(
31 iftrue=(%mf_nobs(work.viyagroups)>0),
32 desc=Check the groups dataset has rows
33)
34%mp_assert(
35 iftrue=(%mf_existvar(work.viyagroups,name)>0),
36 desc=Check the dataset carries a name column
37)