package router import ( "os" "testing" ) // TestDumpPrompt writes the router prompt and grammar to disk so the training // workspace labels with the daemon's own contract rather than a retyped copy. // It is inert unless MAVEN_DUMP_PROMPT names a directory. func TestDumpPrompt(t *testing.T) { dir := os.Getenv("MAVEN_DUMP_PROMPT") if dir == "" { t.Skip("MAVEN_DUMP_PROMPT unset") } if err := os.WriteFile(dir+"/route_system.txt", []byte(routeSystem), 0o644); err != nil { t.Fatal(err) } if err := os.WriteFile(dir+"/route_grammar.gbnf", []byte(routeGrammar), 0o644); err != nil { t.Fatal(err) } }