test: Clean up and improve golang tests

This adds some consistency to the tests and properly catches difficult
scenarios in some of the lexparse tests.
This commit is contained in:
James Shubin
2018-11-18 20:10:05 -05:00
parent 958d3f6094
commit 48beea3884
8 changed files with 244 additions and 233 deletions

View File

@@ -130,6 +130,10 @@ func TestInterpolate0(t *testing.T) {
names := []string{}
for index, tc := range testCases { // run all the tests
if tc.name == "" {
t.Errorf("test #%d: not named", index)
continue
}
if util.StrInList(tc.name, names) {
t.Errorf("test #%d: duplicate sub test name of: %s", index, tc.name)
continue