No worries!


On Wed, Jan 8, 2014 at 9:44 PM, Phil Pennock <notifications@github.com>wrote:

> In server/client_test.go:
>
> > +// This is from bug report #18
> > +func TestTwoTokenPubMatchSingleToke
> nSub(t *testing.T) {
> > +	_, c, cr := setupClient()
> > +	test := []byte("PUB foo.bar 5\r\nhello\r\nSUB foo 1\r\nPING\r\nPUB foo.bar 5\r\nhello\r\nPING\r\n")
> > +	go c.parse(test)
> > +	l, err := cr.ReadString('\n')
> > +	if err != nil {
> > +		t.Fatalf("Error receiving info from server: %v\n", err)
> > +	}
> > +	if !strings.HasPrefix(l, "PONG\r\n") {
> > +		t.Fatalf("PONG response incorrect: %s\n", l)
> > +	}
> > +	// Expect just a pong, no match should exist here..
> > +	l, err = cr.ReadString('\n')
> > +	if !strings.HasPrefix(l, "PONG\r\n") {
> > +		t.Fatalf("PONG response was expected, got: %s\n", l)
>
> Er, yes. Sorry. I was thinking of %q and its semantics but wrote %v.
> PEBKAC, thanks for the catch.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/apcera/gnatsd/pull/19/files#r8748016>
> .
>