...

Source file src/cuelang.org/go/mod/modzip/vendor_test.go

Documentation: cuelang.org/go/mod/modzip

     1  // Copyright 2020 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package modzip
     6  
     7  import "testing"
     8  
     9  func TestIsVendoredPackage(t *testing.T) {
    10  	for _, tc := range []struct {
    11  		path string
    12  		want bool
    13  	}{
    14  		{path: "cue.mod/vendor/foo", want: true},
    15  		{path: "vendor/foo/foo.go", want: false},
    16  	} {
    17  		got := isVendoredPackage(tc.path)
    18  		if got != tc.want {
    19  			t.Errorf("isVendoredPackage(%q) = %t; want %t", tc.path, got, tc.want)
    20  		}
    21  	}
    22  }
    23  

View as plain text