aboutsummaryrefslogtreecommitdiff
path: root/tests/core/go_test/x_defs/x_defs_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'tests/core/go_test/x_defs/x_defs_test.go')
-rw-r--r--tests/core/go_test/x_defs/x_defs_test.go34
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/core/go_test/x_defs/x_defs_test.go b/tests/core/go_test/x_defs/x_defs_test.go
new file mode 100644
index 00000000..0832c247
--- /dev/null
+++ b/tests/core/go_test/x_defs/x_defs_test.go
@@ -0,0 +1,34 @@
+package x_defs_lib_test
+
+import (
+ "os"
+ "testing"
+
+ "github.com/bazelbuild/rules_go/go/runfiles"
+
+ "github.com/bazelbuild/rules_go/tests/core/go_test/x_defs/x_defs_lib"
+)
+
+var BinGo = "not set"
+
+func TestLibGoPath(t *testing.T) {
+ libGoPath, err := runfiles.Rlocation(x_defs_lib.LibGo)
+ if err != nil {
+ t.Fatal(err)
+ }
+ _, err = os.Stat(libGoPath)
+ if err != nil {
+ t.Fatal(err)
+ }
+}
+
+func TestBinGoPath(t *testing.T) {
+ binGoPath, err := runfiles.Rlocation(BinGo)
+ if err != nil {
+ t.Fatal(err)
+ }
+ _, err = os.Stat(binGoPath)
+ if err != nil {
+ t.Fatal(err)
+ }
+}