// Copyright 2014 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 vcs import ( "reflect" "strings" "testing" ) var parseMetaGoImportsTests = []struct { in string mod ModuleMode out []metaImport }{ { ``, IgnoreMod, []metaImport{{"foo/bar", "git", "https://github.com/rsc/foo/bar"}}, }, { ` `, IgnoreMod, []metaImport{ {"foo/bar", "git", "https://github.com/rsc/foo/bar"}, {"baz/quux", "git", "http://github.com/rsc/baz/quux"}, }, }, { ` `, IgnoreMod, []metaImport{ {"foo/bar", "git", "https://github.com/rsc/foo/bar"}, }, }, { ` `, IgnoreMod, []metaImport{ {"foo/bar", "git", "https://github.com/rsc/foo/bar"}, }, }, { ` `, PreferMod, []metaImport{ {"foo/bar", "mod", "http://github.com/rsc/baz/quux"}, }, }, { `
`, IgnoreMod, []metaImport{{"foo/bar", "git", "https://github.com/rsc/foo/bar"}}, }, { ` `, IgnoreMod, []metaImport{{"foo/bar", "git", "https://github.com/rsc/foo/bar"}}, }, { ``, IgnoreMod, []metaImport{{"foo/bar", "git", "https://github.com/rsc/foo/bar"}}, }, { // XML doesn't like