Skip to content

Commit fd3c308

Browse files
test: Add negative test for wrong file skipping
1 parent 3aaa77b commit fd3c308

File tree

6 files changed

+54
-0
lines changed

6 files changed

+54
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package testspecial
2+
3+
func Foo() {}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package testspecial_test
2+
3+
import (
4+
"testing"
5+
6+
"sg/testspecial"
7+
)
8+
9+
func TestFoo_Blackbox(*testing.T) { testspecial.Foo() }
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package testspecial
2+
3+
func TestFoo_Whitebox() { Foo() }
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module sg/testspecial
2+
3+
go 1.19
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package testspecial
2+
// ^^^^^^^^^^^ definition 0.1.test `sg/testspecial`/
3+
// documentation
4+
// > package testspecial
5+
6+
func Foo() {}
7+
// ^^^ definition 0.1.test `sg/testspecial`/Foo().
8+
// documentation
9+
// > ```go
10+
// > func Foo()
11+
// > ```
12+
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package testspecial_test
2+
// ^^^^^^^^^^^^^^^^ definition 0.1.test `sg/testspecial_test`/
3+
// documentation
4+
// > package testspecial_test
5+
6+
import (
7+
"testing"
8+
// ^^^^^^^ reference github.com/golang/go/src go1.22 testing/
9+
10+
"sg/testspecial"
11+
// ^^^^^^^^^^^^^^ reference 0.1.test `sg/testspecial`/
12+
)
13+
14+
func TestFoo_Blackbox(*testing.T) { testspecial.Foo() }
15+
// ^^^^^^^^^^^^^^^^ definition 0.1.test `sg/testspecial_test`/TestFoo_Blackbox().
16+
// documentation
17+
// > ```go
18+
// > func TestFoo_Blackbox(*T)
19+
// > ```
20+
// ^^^^^^^ reference github.com/golang/go/src go1.22 testing/
21+
// ^ reference github.com/golang/go/src go1.22 testing/T#
22+
// ^^^^^^^^^^^ reference 0.1.test `sg/testspecial`/
23+
// ^^^ reference 0.1.test `sg/testspecial`/Foo().
24+

0 commit comments

Comments
 (0)