Skip to content

armgit / ARTEX

Public Imported from GitHub
0

ARTEX - AI autonomous penetration testing system (English translation; upstream: Autumn-27/ARTEX, AGPL-3.0)

367 B
Raw Blame
package agent

import (
	"strings"
	"testing"
)

func TestClipBodyFlattensNewlines(t *testing.T) {
	got := clipBody("ok\r\ninjected log line\n")
	if strings.Contains(got, "\n") || strings.Contains(got, "\r") {
		t.Fatalf("clipBody kept a line break: %q", got)
	}
	if !strings.Contains(got, "injected log line") {
		t.Fatalf("clipBody dropped the text: %q", got)
	}
}