(t *testing.T)
| 493 | } |
| 494 | |
| 495 | func TestIdentifierRegexp(t *testing.T) { |
| 496 | fullCases := []regexpMatch{ |
| 497 | { |
| 498 | input: "da304e823d8ca2b9d863a3c897baeb852ba21ea9a9f1414736394ae7fcaf9821", |
| 499 | match: true, |
| 500 | }, |
| 501 | { |
| 502 | input: "7EC43B381E5AEFE6E04EFB0B3F0693FF2A4A50652D64AEC573905F2DB5889A1C", |
| 503 | match: false, |
| 504 | }, |
| 505 | { |
| 506 | input: "da304e823d8ca2b9d863a3c897baeb852ba21ea9a9f1414736394ae7fcaf", |
| 507 | match: false, |
| 508 | }, |
| 509 | { |
| 510 | input: "sha256:da304e823d8ca2b9d863a3c897baeb852ba21ea9a9f1414736394ae7fcaf9821", |
| 511 | match: false, |
| 512 | }, |
| 513 | { |
| 514 | input: "da304e823d8ca2b9d863a3c897baeb852ba21ea9a9f1414736394ae7fcaf98218482", |
| 515 | match: false, |
| 516 | }, |
| 517 | } |
| 518 | |
| 519 | for i := range fullCases { |
| 520 | checkRegexp(t, anchoredIdentifierRegexp, fullCases[i]) |
| 521 | if IsFullIdentifier(fullCases[i].input) != fullCases[i].match { |
| 522 | t.Errorf("Expected match for %q to be %v", fullCases[i].input, fullCases[i].match) |
| 523 | } |
| 524 | } |
| 525 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…