add tests for local vars