(t *testing.T)
| 142 | if err.Error() != "invalid ID: abc" { |
| 143 | t.Errorf("error = %q, want %q", err, "invalid ID: abc") |
| 144 | } |
| 145 | } |
| 146 | |
| 147 | func TestSeenNonPositiveID(t *testing.T) { |
| 148 | server := seenServer(t) |
| 149 | defer server.Close() |
| 150 | |
| 151 | for _, arg := range []string{"0", "-12345"} { |
| 152 | _, err := runSeen(t, server, "--", arg) |
| 153 | if err == nil { |
| 154 | t.Fatalf("expected error for ID %q", arg) |
| 155 | } |
| 156 | if err.Error() != "invalid ID: "+arg { |
| 157 | t.Errorf("error = %q, want %q", err, "invalid ID: "+arg) |
| 158 | } |
nothing calls this directly
no test coverage detected