/
githubmirror
/
gogs
Обзор
Документация
Войти
/
githubmirror
/
gogs
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
internal/database/mirror_test.go
33 строки
686 B
ᴊᴏᴇ ᴄʜᴇɴ
chore: remove all MIT license file headers (#8083)
09 янв 2026, 03:32
Не верифицирован
09 янв 2026, 03:32
59e9fa1
Код
Авторство
О чём код?
package database import ( "testing" "github.com/stretchr/testify/assert" ) func Test_parseRemoteUpdateOutput(t *testing.T) { tests := []struct { output string expResults []*mirrorSyncResult }{ { ` From https://try.gogs.io/unknwon/upsteam * [new branch] develop -> develop b0bb24f..1d85a4f master -> master - [deleted] (none) -> bugfix `, []*mirrorSyncResult{ {"develop", gitShortEmptyID, ""}, {"master", "b0bb24f", "1d85a4f"}, {"bugfix", "", gitShortEmptyID}, }, }, } for _, test := range tests { t.Run("", func(t *testing.T) { assert.Equal(t, test.expResults, parseRemoteUpdateOutput(test.output)) }) } }