Skip to content

Commit

Permalink
Test preservation of go retract directive
Browse files Browse the repository at this point in the history
  • Loading branch information
mctofu committed Mar 8, 2021
1 parent f94051a commit 1d72d70
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,13 @@
it { is_expected.to include("go 1.13") }
end

context "when a retract directive is present" do
let(:project_name) { "go_retracted" }

it { is_expected.to include("// reason for retraction") }
it { is_expected.to include("retract v1.0.5") }
end

describe "a dependency who's module path has changed (inc version)" do
let(:project_name) { "module_path_and_version_changed" }

Expand Down
10 changes: 10 additions & 0 deletions go_modules/spec/fixtures/projects/go_retracted/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module github.com/dependabot/vgotest

go 1.16

require (
rsc.io/quote v1.4.0
)

// reason for retraction
retract v1.0.5
8 changes: 8 additions & 0 deletions go_modules/spec/fixtures/projects/go_retracted/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package main

import (
_ "rsc.io/quote"
)

func main() {
}

0 comments on commit 1d72d70

Please sign in to comment.