15%mp_assertscope(SNAPSHOT)
16%put scope check:%mf_getquotedstr(blah blah blah);
17%mp_assertscope(COMPARE,
18 desc=Checking that mf_getquotedstr does not leak scope,
19 outds=work.test_results
22%let q_default=%mf_getquotedstr(blah blah blah);
23%let q_double=%mf_getquotedstr(these words are
double quoted,quote=D);
24%let q_none=%mf_getquotedstr(these words are
double quoted,quote=N);
25%let q_empty=%mf_getquotedstr();
26%let q_dlm=%mf_getquotedstr(a b c,dlm=%str(|));
28data work.quoted_check;
29 length
case $10 actual expect $200;
31 actual=
"%superq(q_default)";
32 expect=
"'blah','blah','blah'";
35 actual=
"%superq(q_double)";
36 expect=
'"these","words","are","double","quoted"';
39 actual=
"%superq(q_none)";
40 expect=
"these,words,are,double,quoted";
43 actual=
"%superq(q_empty)";
47 actual=
"%superq(q_dlm)";
53 select count(*) into: n_checked from work.quoted_check;
54 select count(*) into: n_bad from work.quoted_check where actual ne expect;
58 iftrue=(&n_checked=5),
59 desc=Checking that all five quoted forms were compared,
60 outds=work.test_results
65 desc=Checking each quoted form against the
string it should return,
66 outds=work.test_results