Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename test snapshot filenames that broke module import #177

Merged
merged 2 commits into from
Sep 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions extensions/omniv21/fileformat/flatfile/fixedlength/reader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func TestRead(t *testing.T) {
err: io.EOF.Error(),
},
{
name: "e4 min occurs not satisified",
name: "e4 min occurs not satisfied",
r: strings.NewReader("e2h\ne2b:1\ne2t\n1-line\n2-line\n3-line\n"),
err: "input 'test-input' line 6: envelope/envelope_group 'e1/e4' needs min occur 1, but only got 0",
},
Expand Down Expand Up @@ -112,13 +112,13 @@ func TestMoreUnprocessedData(t *testing.T) {
expErr: "",
},
{
name: "linesBuf empty; io error",
name: "linesBuf empty, io error",
r: testlib.NewMockReadCloser("io error", nil),
expMore: false,
expErr: "input 'test-input' line 1: io error",
},
{
name: "linesBuf empty; io.EOF",
name: "linesBuf empty, io.EOF",
r: strings.NewReader(""),
expMore: false,
expErr: "",
Expand Down Expand Up @@ -163,7 +163,7 @@ func TestReadAndMatchRowsBasedEnvelope(t *testing.T) {
expLinesRemain int
}{
{
name: "non-empty buf; io read err",
name: "non-empty buf, io read err",
linesBuf: []string{"line 1"},
r: testlib.NewMockReadCloser("io error", nil),
decl: &EnvelopeDecl{Rows: testlib.IntPtr(2)},
Expand All @@ -174,7 +174,7 @@ func TestReadAndMatchRowsBasedEnvelope(t *testing.T) {
expLinesRemain: 1,
},
{
name: "empty buf; io.EOF",
name: "empty buf, io.EOF",
linesBuf: nil,
r: strings.NewReader(""),
decl: &EnvelopeDecl{Rows: testlib.IntPtr(2)},
Expand All @@ -185,7 +185,7 @@ func TestReadAndMatchRowsBasedEnvelope(t *testing.T) {
expLinesRemain: 0,
},
{
name: "non-empty buf; io.EOF",
name: "non-empty buf, io.EOF",
linesBuf: []string{"line 1"},
r: strings.NewReader(""),
decl: &EnvelopeDecl{Rows: testlib.IntPtr(2)},
Expand All @@ -196,7 +196,7 @@ func TestReadAndMatchRowsBasedEnvelope(t *testing.T) {
expLinesRemain: 1,
},
{
name: "non-empty buf; no read; match; create IDR",
name: "non-empty buf, no read, match, create IDR",
linesBuf: []string{"line 1", "line 2", "line 3"},
r: strings.NewReader(""),
decl: &EnvelopeDecl{
Expand All @@ -214,7 +214,7 @@ func TestReadAndMatchRowsBasedEnvelope(t *testing.T) {
expLinesRemain: 1,
},
{
name: "empty buf; read; match; no IDR",
name: "empty buf, read, match, no IDR",
linesBuf: nil,
r: strings.NewReader("line 1\n"),
decl: &EnvelopeDecl{
Expand Down Expand Up @@ -269,7 +269,7 @@ func TestReadAndMatchHeaderFooterBasedEnvelope(t *testing.T) {
expLinesRemain int
}{
{
name: "empty buf; io read err",
name: "empty buf, io read err",
linesBuf: nil,
r: testlib.NewMockReadCloser("io error", nil),
decl: nil,
Expand All @@ -280,7 +280,7 @@ func TestReadAndMatchHeaderFooterBasedEnvelope(t *testing.T) {
expLinesRemain: 0,
},
{
name: "non-empty buf; header not match",
name: "non-empty buf, header not match",
linesBuf: []string{"line 1"},
r: testlib.NewMockReadCloser("io error", nil), // shouldn't be called
decl: &EnvelopeDecl{headerRegexp: regexp.MustCompile("^header")},
Expand All @@ -291,7 +291,7 @@ func TestReadAndMatchHeaderFooterBasedEnvelope(t *testing.T) {
expLinesRemain: 1,
},
{
name: "empty buf; single line header/footer match",
name: "empty buf, single line header/footer match",
linesBuf: nil,
r: strings.NewReader("line 1"),
decl: &EnvelopeDecl{
Expand All @@ -306,7 +306,7 @@ func TestReadAndMatchHeaderFooterBasedEnvelope(t *testing.T) {
expLinesRemain: 0,
},
{
name: "1-line buf; 3-line header/footer match",
name: "1-line buf, 3-line header/footer match",
linesBuf: []string{"ABCEFG"},
r: strings.NewReader("hello\n123456\n"),
decl: &EnvelopeDecl{
Expand All @@ -327,7 +327,7 @@ func TestReadAndMatchHeaderFooterBasedEnvelope(t *testing.T) {
expLinesRemain: 3, // it's a match, but no idr created, so the lines remain cached
},
{
name: "1-line buf; header matches, footer line read io error",
name: "1-line buf, header matches, footer line read io error",
linesBuf: []string{"ABCEFG"},
r: testlib.NewMockReadCloser("io error", nil),
decl: &EnvelopeDecl{
Expand All @@ -341,7 +341,7 @@ func TestReadAndMatchHeaderFooterBasedEnvelope(t *testing.T) {
expLinesRemain: 1,
},
{
name: "1-line buf; header matches, footer line read io.EOF",
name: "1-line buf, header matches, footer line read io.EOF",
linesBuf: []string{"ABCEFG"},
r: strings.NewReader(""),
decl: &EnvelopeDecl{
Expand Down