File: errors_test.go

package info (click to toggle)
mtail 3.2.24-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,384 kB
  • sloc: yacc: 647; makefile: 226; sh: 78; lisp: 77; awk: 17
file content (20 lines) | stat: -rw-r--r-- 408 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright 2019 Google Inc. All Rights Reserved.
// This file is available under the Apache license.

package errors_test

import (
	"testing"

	"github.com/jaqx0r/mtail/internal/runtime/compiler/errors"
)

func TestNilErrorPosition(t *testing.T) {
	e := errors.ErrorList{}
	e.Add(nil, "error")
	r := e.Error()
	expected := ":0:0: error"
	if r != expected {
		t.Errorf("want %q, got %q", expected, r)
	}
}