add testcase for functions in {key:...}
fix bug with functions in {key:...}