mirror of
https://github.com/R0m1k3/Loki.git
synced 2026-10-22 06:28:11 +02:00
Rebaptise AJEAN en Loki (fork, lignée conservée)
- module github.com/R0m1k3/Loki, cmd/loki, internal/loki (package loki) - LOKI_HOME, LOKI_MODEL_DIRS, LOKI_SERVICE, LOKI_DL_CONNS ; /etc/loki ; units loki-engine / loki-ui ; binaire et aide CLI - updateRepo pointe sur R0m1k3/Loki (l'auto-update ne tirera plus les binaires AJEAN amont) Conservé à l'identique : le domaine ajean.link (service de tunnel amont), les littéraux de migration 0.7.x (migrate_07.go), RELEASE_NOTES.md et LICENSE (historique et licence de l'amont). go build/vet/test : verts.
This commit is contained in:
157 files changed
+928
-928
No files matched your search
@@ -0,0 +1,35 @@
|
||||
package loki
|
||||
|
||||
import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
// Un chemin relatif du modèle doit atterrir dans le workspace, jamais dans le
|
||||
// répertoire courant du processus (Bureau, C:\ProgramData\loki\bin…).
|
||||
func TestResolveAgentPathRelative(t *testing.T) {
|
||||
got := resolveAgentPath("meteo.json")
|
||||
want := filepath.Join(agentWorkspace(), "meteo.json")
|
||||
if got != want {
|
||||
t.Fatalf("resolveAgentPath = %q, attendu %q", got, want)
|
||||
}
|
||||
}
|
||||
|
||||
// Un chemin absolu demandé explicitement reste intouché.
|
||||
func TestResolveAgentPathAbsolute(t *testing.T) {
|
||||
abs := filepath.Join(t.TempDir(), "rapport.md")
|
||||
if got := resolveAgentPath(abs); got != abs {
|
||||
t.Fatalf("resolveAgentPath = %q, attendu %q", got, abs)
|
||||
}
|
||||
}
|
||||
|
||||
func TestResolveAgentPathSubdir(t *testing.T) {
|
||||
got := resolveAgentPath("notes/2026/a.txt")
|
||||
if !strings.HasPrefix(got, agentWorkspace()) {
|
||||
t.Fatalf("%q hors du workspace %q", got, agentWorkspace())
|
||||
}
|
||||
if strings.Contains(got, "/") && filepath.Separator != '/' {
|
||||
t.Fatalf("séparateurs non normalisés : %q", got)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user