Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
mv_registerclient.test.2.sas
Go to the documentation of this file.
1/**
2 @file
3 @brief Testing mv_registerclient.sas macro
4 @details Tests for unsuccessful registration. To do this, overrides are
5 applied for the mf_loc.sas and mp_abort.sas macros.
6
7 <h4> SAS Macros </h4>
8 @li mp_assert.sas
9 @li mv_registerclient.sas
10
11**/
12
13/**
14 * Test Case
15 */
16
17%macro mf_loc(param);
18 /does/not/exist
19%mend mf_loc;
20
21%macro mp_abort(iftrue=,mac=mp_abort.sas, type=, msg=);
22 %if not(%eval(%unquote(&iftrue))) %then %return;
23 %put %substr(&msg,1,16);
24 %mp_assert(
25 iftrue=("%substr(&msg,1,16)"="Unable to access"),
26 desc=Check that abort happens when consul token is unavailable
27 )
28 %webout(OPEN)
29 %webout(OBJ, TEST_RESULTS)
30 %webout(CLOSE)
31 %let syscc=0;
32 data _null_;
33 abort cancel nolist;
34 run;
35%mend mp_abort;
36
37%mv_registerclient( outds=testds)
38
39%mp_assert(
40 iftrue=(0=1),
41 desc=Check that abort happens when consul token is unavailable
42)