Arch Linux helpers and parsers
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

39 lines
542 B

package aur
import (
"os"
"testing"
)
func TestClient(t *testing.T) {
if os.Getenv("TEST_CLIENT") == "" {
t.Skip("TEST_CLIENT not set")
}
var (
c = New()
r []*Info
err error
)
if r, err = c.Search("linux", Name); err != nil {
t.Fatal(err)
}
if len(r) == 0 {
t.Fatal(`no results`)
}
t.Log(r)
if r, err = c.Search("maze", Maintainer); err != nil {
t.Fatal(err)
}
if len(r) == 0 {
t.Fatal(`no results`)
}
t.Log(r)
if r, err = c.Infos("pacaur"); err != nil {
t.Fatal(err)
}
t.Logf("%#+v\n", r[0])
}