24 %initTestcase(i_object=getvars.sas, i_desc=simple example with sashelp.class)
25 %let vars=%getvars(sashelp.class);
27 %assertEquals(i_actual=&vars, i_expected=Name Sex Age Height Weight, i_desc=Variablen prüfen)
31 %initTestcase(i_object=getvars.sas, i_desc=%str(simple example with sashelp.class, different delimiter))
32 %let vars=%getvars(sashelp.class,dlm=%str(,));
33 %assertEquals(i_actual=&vars, i_expected=%str(Name,Sex,Age,Height,Weight), i_desc=check variables)
36 %initTestcase(i_object=getvars.sas, i_desc=example with variable names containing special characters)
37 options validvarname=any;
43 %let vars=
"%getvars(test,dlm=%str(",
"))";
44 %assertEquals(i_actual=&vars, i_expected=%str(
"a b c",
"$6789",
";6789"), i_desc=check variables)
46 %
if &sysver=9.1 %then %
do;
47 %assertLog(i_warnings=1,i_desc=%str(check log, one warning due to validvarname))
48 %endTestcase(i_assertLog=0)
54 %initTestcase(i_object=getvars.sas, i_desc=example with empty dataset)
58 %let vars=%getvars(test);
59 %assertEquals(i_actual=&vars, i_expected=, i_desc=no variables found)
62 %initTestcase(i_object=getvars.sas, i_desc=example without dataset specified)
64 %assertEquals(i_actual=&vars, i_expected=, i_desc=no variables found)
67 %initTestcase(i_object=getvars.sas, i_desc=example with invalid dataset)
68 %let vars=%getvars(xxx);
69 %assertEquals(i_actual=&vars, i_expected=, i_desc=example with invalid dataset)