support settings and defines, update tests