add {VAR,}CHAR smoketests, fix bug