-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Add negative test for wrong file skipping
- Loading branch information
1 parent
3aaa77b
commit fd3c308
Showing
6 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package testspecial | ||
|
||
func Foo() {} |
9 changes: 9 additions & 0 deletions
9
internal/testdata/snapshots/input/testspecial/foo_other_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package testspecial_test | ||
|
||
import ( | ||
"testing" | ||
|
||
"sg/testspecial" | ||
) | ||
|
||
func TestFoo_Blackbox(*testing.T) { testspecial.Foo() } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package testspecial | ||
|
||
func TestFoo_Whitebox() { Foo() } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module sg/testspecial | ||
|
||
go 1.19 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package testspecial | ||
// ^^^^^^^^^^^ definition 0.1.test `sg/testspecial`/ | ||
// documentation | ||
// > package testspecial | ||
|
||
func Foo() {} | ||
// ^^^ definition 0.1.test `sg/testspecial`/Foo(). | ||
// documentation | ||
// > ```go | ||
// > func Foo() | ||
// > ``` | ||
|
24 changes: 24 additions & 0 deletions
24
internal/testdata/snapshots/output/testspecial/foo_other_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package testspecial_test | ||
// ^^^^^^^^^^^^^^^^ definition 0.1.test `sg/testspecial_test`/ | ||
// documentation | ||
// > package testspecial_test | ||
|
||
import ( | ||
"testing" | ||
// ^^^^^^^ reference github.com/golang/go/src go1.22 testing/ | ||
|
||
"sg/testspecial" | ||
// ^^^^^^^^^^^^^^ reference 0.1.test `sg/testspecial`/ | ||
) | ||
|
||
func TestFoo_Blackbox(*testing.T) { testspecial.Foo() } | ||
// ^^^^^^^^^^^^^^^^ definition 0.1.test `sg/testspecial_test`/TestFoo_Blackbox(). | ||
// documentation | ||
// > ```go | ||
// > func TestFoo_Blackbox(*T) | ||
// > ``` | ||
// ^^^^^^^ reference github.com/golang/go/src go1.22 testing/ | ||
// ^ reference github.com/golang/go/src go1.22 testing/T# | ||
// ^^^^^^^^^^^ reference 0.1.test `sg/testspecial`/ | ||
// ^^^ reference 0.1.test `sg/testspecial`/Foo(). | ||
|