Initial commit on Forgejo
Some checks failed
CI and releases / Test and vet (push) Failing after 1s
CI and releases / Build release binaries (push) Has been skipped
CI and releases / Publish GitHub release (push) Has been skipped

Fresh repository history for elektrine/tarakan-client hosted at
https://git.elektrine.com/elektrine/tarakan-client.
This commit is contained in:
Maxfield Luke 2026-07-29 04:56:36 -04:00
commit 58b29a7f84
70 changed files with 12994 additions and 0 deletions

View file

@ -0,0 +1,23 @@
package session
import "testing"
func TestTranscriptAppendAndClear(t *testing.T) {
var transcript Transcript
transcript.Append(RoleUser, "scan authentication")
messages := transcript.Messages()
if len(messages) != 1 || messages[0].Content != "scan authentication" {
t.Fatalf("unexpected messages: %#v", messages)
}
messages[0].Content = "changed"
if transcript.Messages()[0].Content != "scan authentication" {
t.Fatal("Messages returned the transcript's backing slice")
}
transcript.Clear()
if len(transcript.Messages()) != 0 {
t.Fatal("Clear did not empty transcript")
}
}