File: vendor_test.go

package info (click to toggle)
golang-github-cue-lang-cue 0.14.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 19,644 kB
  • sloc: makefile: 20; sh: 15
file content (22 lines) | stat: -rw-r--r-- 532 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright 2020 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package modzip

import "testing"

func TestIsVendoredPackage(t *testing.T) {
	for _, tc := range []struct {
		path string
		want bool
	}{
		{path: "cue.mod/vendor/foo", want: true},
		{path: "vendor/foo/foo.go", want: false},
	} {
		got := isVendoredPackage(tc.path)
		if got != tc.want {
			t.Errorf("isVendoredPackage(%q) = %t; want %t", tc.path, got, tc.want)
		}
	}
}