(t *testing.T)
| 7 | ) |
| 8 | |
| 9 | func Test_parseRemoteUpdateOutput(t *testing.T) { |
| 10 | tests := []struct { |
| 11 | output string |
| 12 | expResults []*mirrorSyncResult |
| 13 | }{ |
| 14 | { |
| 15 | ` |
| 16 | From https://try.gogs.io/unknwon/upsteam |
| 17 | * [new branch] develop -> develop |
| 18 | b0bb24f..1d85a4f master -> master |
| 19 | - [deleted] (none) -> bugfix |
| 20 | `, |
| 21 | []*mirrorSyncResult{ |
| 22 | {"develop", gitShortEmptyID, ""}, |
| 23 | {"master", "b0bb24f", "1d85a4f"}, |
| 24 | {"bugfix", "", gitShortEmptyID}, |
| 25 | }, |
| 26 | }, |
| 27 | } |
| 28 | for _, test := range tests { |
| 29 | t.Run("", func(t *testing.T) { |
| 30 | assert.Equal(t, test.expResults, parseRemoteUpdateOutput(test.output)) |
| 31 | }) |
| 32 | } |
| 33 | } |
nothing calls this directly
no test coverage detected