Skip to content

Commit

Permalink
rename test snapshot filenames that broke module import (#177)
Browse files Browse the repository at this point in the history
https://cs.opensource.google/go/x/mod/+/master:module/module.go;l=285;drc=02c991387e35f9e4c0a9b7ce137717055f8d716d

so ";" is not allowed in the snapshot filename if the module needs to be imported.

Filed a ticket against cupaloy: bradleyjkemp/cupaloy#83
  • Loading branch information
jf-tech authored Sep 16, 2022
1 parent 11c23a2 commit 77370e7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
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

0 comments on commit 77370e7

Please sign in to comment.