MCPcopy Create free account
hub / github.com/driangle/taskmd / TestIsAlphanumericID

Function TestIsAlphanumericID

sdk/go/parser/markdown_test.go:710–733  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

708}
709
710func 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
735func TestParseTaskContent_CreatedAtField(t *testing.T) {
736 content := []byte(`---

Callers

nothing calls this directly

Calls 1

isAlphanumericIDFunction · 0.85

Tested by

no test coverage detected