Files
selfpost/internal/legal/license_test.go
T
mix 6c8bf0d3b3
test / test (push) Has been cancelled
legal: close AGPL packaging gaps
Name the copyright holder, ship NOTICE with the image, serve the licence
from the panel footer on every page, and record the vendored htmx licence.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-10 21:56:51 +03:00

22 lines
454 B
Go

package legal
import (
"bytes"
"os"
"path/filepath"
"testing"
)
func TestEmbeddedLicenseMatchesRoot(t *testing.T) {
root, err := os.ReadFile(filepath.Join("..", "..", "LICENSE"))
if err != nil {
t.Fatalf("read root LICENSE: %v", err)
}
if !bytes.Equal(root, License) {
t.Fatal("internal/legal/LICENSE differs from the repository-root LICENSE; copy the root file over")
}
if len(License) == 0 {
t.Fatal("embedded LICENSE is empty")
}
}