Add more term parsing tests.
Test layout and fix bracket location issue.