mirror of
https://github.com/ollama/ollama.git
synced 2025-05-11 10:26:53 +02:00
fix parser name
This commit is contained in:
parent
9cf0f2e973
commit
bd8eed57fc
2 changed files with 32 additions and 6 deletions
|
@ -104,6 +104,16 @@ PARAMETER param1
|
|||
assert.ErrorIs(t, err, io.ErrUnexpectedEOF)
|
||||
}
|
||||
|
||||
func TestParserBadCommand(t *testing.T) {
|
||||
input := `
|
||||
FROM foo
|
||||
BADCOMMAND param1 value1
|
||||
`
|
||||
_, err := Parse(strings.NewReader(input))
|
||||
assert.ErrorIs(t, err, errInvalidCommand)
|
||||
|
||||
}
|
||||
|
||||
func TestParserMessages(t *testing.T) {
|
||||
var cases = []struct {
|
||||
input string
|
||||
|
@ -165,7 +175,7 @@ FROM foo
|
|||
MESSAGE badguy I'm a bad guy!
|
||||
`,
|
||||
nil,
|
||||
errInvalidRole,
|
||||
errInvalidMessageRole,
|
||||
},
|
||||
{
|
||||
`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue