solutions: Solutions Guide engine (catalog, rules, wizard state, native config, knowledge index, CLI)
New nested module yetano.dev/yetano/core/solutions: loads the catalog in assets/solutions on top of the Big Picture, evaluates questions and conditions, resolves packages/modules/capabilities, generates native configuration from typed fragments with per-value origins, and builds architecture graph, plan, lock file and handbook. Knowledge index with yetano: references, search and lint (incl. manual sections). CLI with yet's conventions (solution, task, knowledge, open), standalone as yetano-solutions. No execution, no network. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
586e76889c
commit
2481a0dd27
48 files changed
+10304
No files matched your search
@@ -0,0 +1,38 @@
|
||||
package ref
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestParse(t *testing.T) {
|
||||
for _, s := range []string{
|
||||
"yetano:package/yamase", "yetano:module/yamase/smtpd", "yetano:manual/yamase/mail-domain#dkim",
|
||||
"yetano:manual/yamase-ctl/backup", "yetano:solution/mail-server@1.0.0", "yetano:task/mail.add-domain",
|
||||
"yetano:capability/mail.smtp.inbound", "yetano:bigpicture/story.mail-groupware", "yetano:example/mail-server/personal",
|
||||
} {
|
||||
r, err := Parse(s)
|
||||
if err != nil {
|
||||
t.Errorf("%s: %v", s, err)
|
||||
continue
|
||||
}
|
||||
if r.String() != s {
|
||||
t.Errorf("round trip %s -> %s", s, r.String())
|
||||
}
|
||||
}
|
||||
for _, bad := range []string{"package/yamase", "yetano:", "yetano:nope/x", "yetano:package", "yetano:package/a/b",
|
||||
"yetano:module/x", "yetano:package/../x", "yetano:manual/x", "yetano:package/x#", "yetano:package/x@"} {
|
||||
if _, err := Parse(bad); err == nil {
|
||||
t.Errorf("%q accepted", bad)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestSlug(t *testing.T) {
|
||||
for in, want := range map[string]string{
|
||||
"Schritt 2: Schlüssel erzeugen": "schritt-2-schluessel-erzeugen",
|
||||
"4. Trusted relays, SRS bounces and ereject": "4-trusted-relays-srs-bounces-and-ereject",
|
||||
" Hello World! ": "hello-world",
|
||||
} {
|
||||
if got := Slug(in); got != want {
|
||||
t.Errorf("%q: %q, want %q", in, got, want)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user