Skip to content

Commit 77370e7

Browse files
authored
rename test snapshot filenames that broke module import (#177)
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
1 parent 11c23a2 commit 77370e7

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

extensions/omniv21/fileformat/flatfile/fixedlength/reader_test.go

+14-14
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func TestRead(t *testing.T) {
6565
err: io.EOF.Error(),
6666
},
6767
{
68-
name: "e4 min occurs not satisified",
68+
name: "e4 min occurs not satisfied",
6969
r: strings.NewReader("e2h\ne2b:1\ne2t\n1-line\n2-line\n3-line\n"),
7070
err: "input 'test-input' line 6: envelope/envelope_group 'e1/e4' needs min occur 1, but only got 0",
7171
},
@@ -112,13 +112,13 @@ func TestMoreUnprocessedData(t *testing.T) {
112112
expErr: "",
113113
},
114114
{
115-
name: "linesBuf empty; io error",
115+
name: "linesBuf empty, io error",
116116
r: testlib.NewMockReadCloser("io error", nil),
117117
expMore: false,
118118
expErr: "input 'test-input' line 1: io error",
119119
},
120120
{
121-
name: "linesBuf empty; io.EOF",
121+
name: "linesBuf empty, io.EOF",
122122
r: strings.NewReader(""),
123123
expMore: false,
124124
expErr: "",
@@ -163,7 +163,7 @@ func TestReadAndMatchRowsBasedEnvelope(t *testing.T) {
163163
expLinesRemain int
164164
}{
165165
{
166-
name: "non-empty buf; io read err",
166+
name: "non-empty buf, io read err",
167167
linesBuf: []string{"line 1"},
168168
r: testlib.NewMockReadCloser("io error", nil),
169169
decl: &EnvelopeDecl{Rows: testlib.IntPtr(2)},
@@ -174,7 +174,7 @@ func TestReadAndMatchRowsBasedEnvelope(t *testing.T) {
174174
expLinesRemain: 1,
175175
},
176176
{
177-
name: "empty buf; io.EOF",
177+
name: "empty buf, io.EOF",
178178
linesBuf: nil,
179179
r: strings.NewReader(""),
180180
decl: &EnvelopeDecl{Rows: testlib.IntPtr(2)},
@@ -185,7 +185,7 @@ func TestReadAndMatchRowsBasedEnvelope(t *testing.T) {
185185
expLinesRemain: 0,
186186
},
187187
{
188-
name: "non-empty buf; io.EOF",
188+
name: "non-empty buf, io.EOF",
189189
linesBuf: []string{"line 1"},
190190
r: strings.NewReader(""),
191191
decl: &EnvelopeDecl{Rows: testlib.IntPtr(2)},
@@ -196,7 +196,7 @@ func TestReadAndMatchRowsBasedEnvelope(t *testing.T) {
196196
expLinesRemain: 1,
197197
},
198198
{
199-
name: "non-empty buf; no read; match; create IDR",
199+
name: "non-empty buf, no read, match, create IDR",
200200
linesBuf: []string{"line 1", "line 2", "line 3"},
201201
r: strings.NewReader(""),
202202
decl: &EnvelopeDecl{
@@ -214,7 +214,7 @@ func TestReadAndMatchRowsBasedEnvelope(t *testing.T) {
214214
expLinesRemain: 1,
215215
},
216216
{
217-
name: "empty buf; read; match; no IDR",
217+
name: "empty buf, read, match, no IDR",
218218
linesBuf: nil,
219219
r: strings.NewReader("line 1\n"),
220220
decl: &EnvelopeDecl{
@@ -269,7 +269,7 @@ func TestReadAndMatchHeaderFooterBasedEnvelope(t *testing.T) {
269269
expLinesRemain int
270270
}{
271271
{
272-
name: "empty buf; io read err",
272+
name: "empty buf, io read err",
273273
linesBuf: nil,
274274
r: testlib.NewMockReadCloser("io error", nil),
275275
decl: nil,
@@ -280,7 +280,7 @@ func TestReadAndMatchHeaderFooterBasedEnvelope(t *testing.T) {
280280
expLinesRemain: 0,
281281
},
282282
{
283-
name: "non-empty buf; header not match",
283+
name: "non-empty buf, header not match",
284284
linesBuf: []string{"line 1"},
285285
r: testlib.NewMockReadCloser("io error", nil), // shouldn't be called
286286
decl: &EnvelopeDecl{headerRegexp: regexp.MustCompile("^header")},
@@ -291,7 +291,7 @@ func TestReadAndMatchHeaderFooterBasedEnvelope(t *testing.T) {
291291
expLinesRemain: 1,
292292
},
293293
{
294-
name: "empty buf; single line header/footer match",
294+
name: "empty buf, single line header/footer match",
295295
linesBuf: nil,
296296
r: strings.NewReader("line 1"),
297297
decl: &EnvelopeDecl{
@@ -306,7 +306,7 @@ func TestReadAndMatchHeaderFooterBasedEnvelope(t *testing.T) {
306306
expLinesRemain: 0,
307307
},
308308
{
309-
name: "1-line buf; 3-line header/footer match",
309+
name: "1-line buf, 3-line header/footer match",
310310
linesBuf: []string{"ABCEFG"},
311311
r: strings.NewReader("hello\n123456\n"),
312312
decl: &EnvelopeDecl{
@@ -327,7 +327,7 @@ func TestReadAndMatchHeaderFooterBasedEnvelope(t *testing.T) {
327327
expLinesRemain: 3, // it's a match, but no idr created, so the lines remain cached
328328
},
329329
{
330-
name: "1-line buf; header matches, footer line read io error",
330+
name: "1-line buf, header matches, footer line read io error",
331331
linesBuf: []string{"ABCEFG"},
332332
r: testlib.NewMockReadCloser("io error", nil),
333333
decl: &EnvelopeDecl{
@@ -341,7 +341,7 @@ func TestReadAndMatchHeaderFooterBasedEnvelope(t *testing.T) {
341341
expLinesRemain: 1,
342342
},
343343
{
344-
name: "1-line buf; header matches, footer line read io.EOF",
344+
name: "1-line buf, header matches, footer line read io.EOF",
345345
linesBuf: []string{"ABCEFG"},
346346
r: strings.NewReader(""),
347347
decl: &EnvelopeDecl{

0 commit comments

Comments
 (0)