Init commit
Some checks failed
CI/CD Pipeline / Build Docker Image (push) Has been cancelled
CI/CD Pipeline / Test (push) Has been cancelled
CI/CD Pipeline / Build (arm64, windows, linkbeam-windows-arm64.exe) (push) Has been cancelled
CI/CD Pipeline / Build (386, linux, linkbeam-linux-386) (push) Has been cancelled
CI/CD Pipeline / Lint (push) Has been cancelled
CI/CD Pipeline / Build (amd64, linux, linkbeam-linux-amd64) (push) Has been cancelled
CI/CD Pipeline / Build (arm, 7, linux, linkbeam-linux-armv7) (push) Has been cancelled
CI/CD Pipeline / Build (386, windows, linkbeam-windows-386.exe) (push) Has been cancelled
CI/CD Pipeline / Build (amd64, windows, linkbeam-windows-amd64.exe) (push) Has been cancelled
CI/CD Pipeline / Build (arm64, darwin, linkbeam-darwin-arm64) (push) Has been cancelled
CI/CD Pipeline / Build (arm64, linux, linkbeam-linux-arm64) (push) Has been cancelled
CI/CD Pipeline / Build (amd64, darwin, linkbeam-darwin-amd64) (push) Has been cancelled
CI/CD Pipeline / Create Release (push) Has been cancelled

This commit is contained in:
2025-10-12 21:56:53 +04:00
commit 20f949c250
42 changed files with 4478 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
// load_test.go
/*
* Copyright (c) - All Rights Reserved.
*
* See the LICENCE file for more information.
*/
package config
import (
"os"
"path/filepath"
"testing"
)
func TestLoad_Validate(t *testing.T) {
tmpDir := t.TempDir()
badConfigPath := filepath.Join(tmpDir, "bad.yaml")
// Write invalid config (empty name, invalid theme)
content := []byte(`
name: ""
theme: "unknown"
`)
if err := os.WriteFile(badConfigPath, content, 0644); err != nil {
t.Fatalf("failed to write bad config: %v", err)
}
_, err := Load(badConfigPath)
if err == nil {
t.Error("expected error for invalid config, got nil")
}
}