Lines Matching refs:test
166 for _, test := range expandTestCases {
167 got, err := Expand(test.in, func(s string) (string, error) {
171 if err != nil && !test.err {
172 t.Errorf("%q: unexpected error %s", test.in, err.Error())
173 } else if err == nil && test.err {
174 t.Errorf("%q: expected error, got %q", test.in, got)
175 } else if !test.err && got != test.out {
176 t.Errorf("%q: expected %q, got %q", test.in, test.out, got)
182 for _, test := range expandTestCases {
183 got, err := ExpandNinjaEscaped(test.in, expander)
184 if err != nil && !test.err {
185 t.Errorf("%q: unexpected error %s", test.in, err.Error())
186 } else if err == nil && test.err {
187 t.Errorf("%q: expected error, got %q", test.in, got)
188 } else if !test.err && got != test.out_escaped {
189 t.Errorf("%q: expected %q, got %q", test.in, test.out, got)