25 %initTestcase(i_object=getvars.sas, i_desc=simple example with sashelp.class)
 
   26 %let vars=%getvars(sashelp.class);
 
   28 %assertEquals(i_actual=&vars, i_expected=Name Sex Age Height Weight, i_desc=Variablen prüfen)
 
   32 %initTestcase(i_object=getvars.sas, i_desc=%str(simple example with sashelp.class, different delimiter))
 
   33 %let vars=%getvars(sashelp.class,dlm=%str(,));
 
   34 %assertEquals(i_actual=&vars, i_expected=%str(Name,Sex,Age,Height,Weight), i_desc=check variables)
 
   37 %initTestcase(i_object=getvars.sas, i_desc=example with variable names containing special characters)
 
   38 options validvarname=any;
 
   44 %let vars=
"%getvars(test,dlm=%str(",
"))";
 
   45 %assertEquals(i_actual=&vars, i_expected=%str(
"a b c",
"$6789",
";6789"), i_desc=check variables)
 
   47 %
if &sysver=9.1 %then %
do;
 
   48    %assertLog(i_warnings=1,i_desc=%str(check log, one warning due to validvarname))
 
   49    %endTestcase(i_assertLog=0) 
 
   55 %initTestcase(i_object=getvars.sas, i_desc=example with empty dataset)
 
   59 %let vars=%getvars(test);
 
   60 %assertEquals(i_actual=&vars, i_expected=, i_desc=no variables found)
 
   63 %initTestcase(i_object=getvars.sas, i_desc=example without dataset specified)
 
   65 %assertEquals(i_actual=&vars, i_expected=, i_desc=no variables found)
 
   68 %initTestcase(i_object=getvars.sas, i_desc=example with invalid dataset)
 
   69 %let vars=%getvars(xxx);
 
   70 %assertEquals(i_actual=&vars, i_expected=, i_desc=example with invalid dataset)