<commit_before>env GO111MODULE=on

# By default, 'go get' should ignore tests
cp go.mod.empty go.mod
go get m/a
! grep rsc.io/quote go.mod

# 'go get -t' should consider test dependencies of the named package.
cp go.mod.empty go.mod
go get -d -t m/a
grep 'rsc.io/quote v1.5.2$' go.mod

# 'go get -t' should not consider test dependencies of imported packages,
# including packages imported from tests.
cp go.mod.empty go.mod
go get -d -t m/b
! grep rsc.io/quote go.mod

# 'go get -t -u' should update test dependencies of the named package.
cp go.mod.empty go.mod
go mod edit -require=rsc.io/quote@v1.5.1
go get -d -t -u m/a
grep 'rsc.io/quote v1.5.2$' go.mod

# 'go get -t -u' should not add or update test dependencies
# of imported packages, including packages imported from tests.
cp go.mod.empty go.mod
go get -d -t -u m/b
! grep rsc.io/quote go.mod
go mod edit -require=rsc.io/quote@v1.5.1
go get -d -t -u m/b
grep 'rsc.io/quote v1.5.1$' go.mod

# 'go get all' should consider test dependencies with or without -t.
cp go.mod.empty go.mod
go get all
grep 'rsc.io/quote v1.5.2$' go.mod

-- go.mod.empty --
module m

-- a/a.go --
package a

-- a/a_test.go --
package a_test

import _ "rsc.io/quote"

-- b/b.go --
package b

import _ "m/a"

-- b/b_test.go --
package b_test

import _ "m/a"<commit_msg>cmd/go: add -d flag to mod_get_test<commit_after>env GO111MODULE=on

# By default, 'go get' should ignore tests
cp go.mod.empty go.mod
go get m/a
! grep rsc.io/quote go.mod

# 'go get -t' should consider test dependencies of the named package.
cp go.mod.empty go.mod
go get -d -t m/a
grep 'rsc.io/quote v1.5.2$' go.mod

# 'go get -t' should not consider test dependencies of imported packages,
# including packages imported from tests.
cp go.mod.empty go.mod
go get -d -t m/b
! grep rsc.io/quote go.mod

# 'go get -t -u' should update test dependencies of the named package.
cp go.mod.empty go.mod
go mod edit -require=rsc.io/quote@v1.5.1
go get -d -t -u m/a
grep 'rsc.io/quote v1.5.2$' go.mod

# 'go get -t -u' should not add or update test dependencies
# of imported packages, including packages imported from tests.
cp go.mod.empty go.mod
go get -d -t -u m/b
! grep rsc.io/quote go.mod
go mod edit -require=rsc.io/quote@v1.5.1
go get -d -t -u m/b
grep 'rsc.io/quote v1.5.1$' go.mod

# 'go get all' should consider test dependencies with or without -t.
cp go.mod.empty go.mod
go get -d all
grep 'rsc.io/quote v1.5.2$' go.mod

-- go.mod.empty --
module m

-- a/a.go --
package a

-- a/a_test.go --
package a_test

import _ "rsc.io/quote"

-- b/b.go --
package b

import _ "m/a"

-- b/b_test.go --
package b_test

import _ "m/a"
{'fraction_non_alphanumeric': 0.1337894336754086, 'fraction_numerical': 0.01596351197263398, 'mean_word_length': 2.781609195402299, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4430487', 'n_tokens_mistral': 1072, 'n_tokens_neox': 1061, 'n_words': 373}