Skip to content

Commit

Permalink
Escape % character in fm.Fprint (#106)
Browse files Browse the repository at this point in the history
* Escape % character in fm.Fprint

* Fix escaping
  • Loading branch information
andygrunwald authored Apr 1, 2022
1 parent 79adba8 commit b24a961
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion projects_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ func TestProjectsService_GetProject_WithSlash(t *testing.T) {
testMethod(t, r, "GET")
testRequestURL(t, r, "/projects/plugins%2Fdelete-project")

fmt.Fprint(w, `)]}'`+"\n"+`{"id":"plugins%2Fdelete-project","name":"plugins/delete-project","parent":"Public-Plugins","description":"A plugin which allows projects to be deleted from Gerrit via an SSH command","state":"ACTIVE"}`)
c := `)]}'` + "\n" + `{"id":"plugins%2Fdelete-project","name":"plugins/delete-project","parent":"Public-Plugins","description":"A plugin which allows projects to be deleted from Gerrit via an SSH command","state":"ACTIVE"}`
fmt.Fprint(w, c)
})
project, _, err := testClient.Projects.GetProject("plugins/delete-project")
if err != nil {
Expand Down

0 comments on commit b24a961

Please sign in to comment.