dmitri.shuralyov.com/go/generated/...

add test case with no final newline

Add test coverage for one more edge case, however unlikely it is.
dmitshur committed 11 months ago commit e1de015411532fa144166aada4201ee443800425
Collapse all
generated_test.go
@@ -24,10 +24,11 @@ func TestParseFile(t *testing.T) {
		{"positive.6.src", true},
		{"positive.7.src", true},
		{"positive.8.src", true},
		{"positive.9.src", true},
		{"positive.10.src", true},
		{"positive.nonewline.src", true},

		// Negative matches.
		{"negative.0.src", false},
		{"negative.1.src", false},
		{"negative.2.src", false},
[generated] testdata/positive.nonewline.src
@@ -0,0 +1,3 @@
// There can be a positive match without a final newline.

// Code generated by tool; DO NOT EDIT.
\ No newline at end of file