| 1 | package configscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/ |
| 2 | |
| 3 | import ( |
| 4 | "testingscip-go gomod github.com/golang/go/src go1.25.0 testing/" |
| 5 | |
| 6 | "github.com/stretchr/testify/assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/" |
| 7 | ) |
| 8 | |
| 9 | func TestSortExtensionsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/TestSortExtensions().(t *testingscip-go gomod github.com/golang/go/src go1.25.0 testing/.Tscip-go gomod github.com/golang/go/src go1.25.0 testing/T#) { |
| 10 | m := map[string]Extensionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/Extension#{ |
| 11 | "baz": Extensionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/Extension#{ |
| 12 | "baz", |
| 13 | "baz-clean %f", |
| 14 | "baz-smudge %f", |
| 15 | 2, |
| 16 | }, |
| 17 | "foo": Extensionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/Extension#{ |
| 18 | "foo", |
| 19 | "foo-clean %f", |
| 20 | "foo-smudge %f", |
| 21 | 0, |
| 22 | }, |
| 23 | "bar": Extensionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/Extension#{ |
| 24 | "bar", |
| 25 | "bar-clean %f", |
| 26 | "bar-smudge %f", |
| 27 | 1, |
| 28 | }, |
| 29 | } |
| 30 | |
| 31 | names := []string{"foo", "bar", "baz"} |
| 32 | |
| 33 | sorted, err := SortExtensionsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/SortExtensions().(m) |
| 34 | |
| 35 | assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.Nilscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Nil().(t, err) |
| 36 | |
| 37 | for i, ext := range sorted { |
| 38 | name := names[i] |
| 39 | assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.Equalscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Equal().(t, name, ext.Namescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/Extension#Name.) |
| 40 | assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.Equalscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Equal().(t, name+"-clean %f", ext.Cleanscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/Extension#Clean.) |
| 41 | assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.Equalscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Equal().(t, name+"-smudge %f", ext.Smudgescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/Extension#Smudge.) |
| 42 | assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.Equalscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Equal().(t, i, ext.Priorityscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/Extension#Priority.) |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | func TestSortExtensionsDuplicatePriorityscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/TestSortExtensionsDuplicatePriority().(t *testingscip-go gomod github.com/golang/go/src go1.25.0 testing/.Tscip-go gomod github.com/golang/go/src go1.25.0 testing/T#) { |
| 47 | m := map[string]Extensionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/Extension#{ |
| 48 | "foo": Extensionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/Extension#{ |
| 49 | "foo", |
| 50 | "foo-clean %f", |
| 51 | "foo-smudge %f", |
| 52 | 0, |
| 53 | }, |
| 54 | "bar": Extensionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/Extension#{ |
| 55 | "bar", |
| 56 | "bar-clean %f", |
| 57 | "bar-smudge %f", |
| 58 | 0, |
| 59 | }, |
| 60 | } |
| 61 | |
| 62 | sorted, err := SortExtensionsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/SortExtensions().(m) |
| 63 | |
| 64 | assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.NotNilscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/NotNil().(t, err) |
| 65 | assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.Emptyscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Empty().(t, sorted) |
| 66 | } |