mirror of
https://github.com/genuinetools/reg.git
synced 2024-09-28 11:46:20 -04:00
72cd07cf34
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
20 lines
371 B
Go
20 lines
371 B
Go
package main
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
func TestList(t *testing.T) {
|
|
out, err := run("ls")
|
|
if err != nil {
|
|
t.Fatalf("output: %s, error: %v", string(out), err)
|
|
}
|
|
expected := `REPO TAGS
|
|
busybox glibc, musl
|
|
alpine latest
|
|
`
|
|
if !strings.HasSuffix(out, expected) {
|
|
t.Fatalf("expected: %s\ngot: %s", expected, out)
|
|
}
|
|
}
|