mirror of
https://github.com/ollama/ollama.git
synced 2025-11-10 22:20:14 +01:00
templates: fix crash in improperly defined templates (#12483)
This commit is contained in:
@@ -192,7 +192,11 @@ func TestParse(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if diff := cmp.Diff(tmpl.Vars(), tt.vars); diff != "" {
|
||||
v, err := tmpl.Vars()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if diff := cmp.Diff(v, tt.vars); diff != "" {
|
||||
t.Errorf("mismatch (-got +want):\n%s", diff)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user