(t *testing.T)
| 708 | } |
| 709 | |
| 710 | func TestIsAlphanumericID(t *testing.T) { |
| 711 | tests := []struct { |
| 712 | input string |
| 713 | want bool |
| 714 | }{ |
| 715 | {"a3f9x2", true}, |
| 716 | {"ab1", true}, |
| 717 | {"a1b2c3d4", true}, |
| 718 | {"abc", false}, |
| 719 | {"readme", false}, |
| 720 | {"ab", false}, |
| 721 | {"a1b2c3d4e", false}, |
| 722 | {"A3F9X2", false}, |
| 723 | {"a3-f9", false}, |
| 724 | {"", false}, |
| 725 | } |
| 726 | for _, tt := range tests { |
| 727 | t.Run(tt.input, func(t *testing.T) { |
| 728 | if got := isAlphanumericID(tt.input); got != tt.want { |
| 729 | t.Errorf("isAlphanumericID(%q) = %v, want %v", tt.input, got, tt.want) |
| 730 | } |
| 731 | }) |
| 732 | } |
| 733 | } |
| 734 | |
| 735 | func TestParseTaskContent_CreatedAtField(t *testing.T) { |
| 736 | content := []byte(`--- |
nothing calls this directly
no test coverage detected