Skip to content

Linger is An Open-Source Personal Agent That Runs Fully on Your PC. We aim to break Big Tech’s grip on AI by bringing powerful local AI to everyday computers through efficient model–harness co-design, so everyone can run their own.

399 B
Raw Blame
package ids

import (
	"regexp"
	"testing"
)

func TestNewFormatAndUniqueness(t *testing.T) {
	pattern := regexp.MustCompile(`^room_[0-9a-f]{32}$`)
	first, second := New("room"), New("room")
	if !pattern.MatchString(first) || !pattern.MatchString(second) {
		t.Fatalf("ids=%q,%q want room_<32 hex>", first, second)
	}
	if first == second {
		t.Fatalf("ids must be unique, got %q twice", first)
	}
}