| 1 | package toolsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/ |
| 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 | type QuotedFieldsTestCasescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/QuotedFieldsTestCase# struct { |
| 10 | Givenscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/QuotedFieldsTestCase#Given. string |
| 11 | Expectedscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/QuotedFieldsTestCase#Expected. []string |
| 12 | } |
| 13 | |
| 14 | func (c *QuotedFieldsTestCasescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/QuotedFieldsTestCase#) Assertscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/QuotedFieldsTestCase#Assert().(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#) { |
| 15 | actual := QuotedFieldsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/QuotedFields().(c.Givenscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/QuotedFieldsTestCase#Given.) |
| 16 | |
| 17 | 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, c.Expectedscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/QuotedFieldsTestCase#Expected., actual, |
| 18 | "tools: expected QuotedFields(%q) to equal %#v (was %#v)", |
| 19 | c.Givenscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/QuotedFieldsTestCase#Given., c.Expectedscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/QuotedFieldsTestCase#Expected., actual, |
| 20 | ) |
| 21 | } |
| 22 | |
| 23 | func TestQuotedFieldsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/TestQuotedFields().(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#) { |
| 24 | for desc, c := range map[string]QuotedFieldsTestCasescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/QuotedFieldsTestCase#{ |
| 25 | "simple": {`foo bar`, []string{"foo", "bar"}}, |
| 26 | "simple trailing": {`foo bar `, []string{"foo", "bar"}}, |
| 27 | "simple leading": {` foo bar`, []string{"foo", "bar"}}, |
| 28 | |
| 29 | "single quotes": {`foo 'bar baz'`, []string{"foo", "bar baz"}}, |
| 30 | "single quotes trailing": {`foo 'bar baz' `, []string{"foo", "bar baz"}}, |
| 31 | "single quotes leading": {` foo 'bar baz'`, []string{"foo", "bar baz"}}, |
| 32 | |
| 33 | "single quotes empty": {`foo ''`, []string{"foo", ""}}, |
| 34 | "single quotes trailing empty": {`foo '' `, []string{"foo", ""}}, |
| 35 | "single quotes leading empty": {` foo ''`, []string{"foo", ""}}, |
| 36 | |
| 37 | "double quotes": {`foo "bar baz"`, []string{"foo", "bar baz"}}, |
| 38 | "double quotes trailing": {`foo "bar baz" `, []string{"foo", "bar baz"}}, |
| 39 | "double quotes leading": {` foo "bar baz"`, []string{"foo", "bar baz"}}, |
| 40 | |
| 41 | "double quotes empty": {`foo ""`, []string{"foo", ""}}, |
| 42 | "double quotes trailing empty": {`foo "" `, []string{"foo", ""}}, |
| 43 | "double quotes leading empty": {` foo ""`, []string{"foo", ""}}, |
| 44 | |
| 45 | "nested single quotes": {`foo 'bar 'baz''`, []string{"foo", "bar 'baz'"}}, |
| 46 | "nested single quotes trailing": {`foo 'bar 'baz'' `, []string{"foo", "bar 'baz'"}}, |
| 47 | "nested single quotes leading": {` foo 'bar 'baz''`, []string{"foo", "bar 'baz'"}}, |
| 48 | |
| 49 | "nested single quotes empty": {`foo 'bar '''`, []string{"foo", "bar ''"}}, |
| 50 | "nested single quotes trailing empty": {`foo 'bar ''' `, []string{"foo", "bar ''"}}, |
| 51 | "nested single quotes leading empty": {` foo 'bar '''`, []string{"foo", "bar ''"}}, |
| 52 | |
| 53 | "nested double quotes": {`foo "bar "baz""`, []string{"foo", `bar "baz"`}}, |
| 54 | "nested double quotes trailing": {`foo "bar "baz"" `, []string{"foo", `bar "baz"`}}, |
| 55 | "nested double quotes leading": {` foo "bar "baz""`, []string{"foo", `bar "baz"`}}, |
| 56 | |
| 57 | "nested double quotes empty": {`foo "bar """`, []string{"foo", `bar ""`}}, |
| 58 | "nested double quotes trailing empty": {`foo "bar """ `, []string{"foo", `bar ""`}}, |
| 59 | "nested double quotes leading empty": {` foo "bar """`, []string{"foo", `bar ""`}}, |
| 60 | |
| 61 | "mixed quotes": {`foo 'bar "baz"'`, []string{"foo", `bar "baz"`}}, |
| 62 | "mixed quotes trailing": {`foo 'bar "baz"' `, []string{"foo", `bar "baz"`}}, |
| 63 | "mixed quotes leading": {` foo 'bar "baz"'`, []string{"foo", `bar "baz"`}}, |
| 64 | |
| 65 | "mixed quotes empty": {`foo 'bar ""'`, []string{"foo", `bar ""`}}, |
| 66 | "mixed quotes trailing empty": {`foo 'bar ""' `, []string{"foo", `bar ""`}}, |
| 67 | "mixed quotes leading empty": {` foo 'bar ""'`, []string{"foo", `bar ""`}}, |
| 68 | } { |
| 69 | t.Logscip-go gomod github.com/golang/go/src go1.25.0 testing/common#Log().(desc) |
| 70 | c.Assertscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/QuotedFieldsTestCase#Assert().(t) |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | func TestLongestReturnsEmptyStringGivenEmptySetscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/TestLongestReturnsEmptyStringGivenEmptySet().(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#) { |
| 75 | 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, "", Longestscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/Longest().(nil)) |
| 76 | } |
| 77 | |
| 78 | func TestLongestReturnsLongestStringscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/TestLongestReturnsLongestString().(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#) { |
| 79 | 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, "longest", Longestscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/Longest().([]string{"short", "longer", "longest"})) |
| 80 | } |
| 81 | |
| 82 | func TestLongestReturnsLastStringGivenSameLengthscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/TestLongestReturnsLastStringGivenSameLength().(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#) { |
| 83 | 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, "baz", Longestscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/Longest().([]string{"foo", "bar", "baz"})) |
| 84 | } |
| 85 | |
| 86 | func TestRjustRightJustifiesStringscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/TestRjustRightJustifiesString().(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#) { |
| 87 | unjust := []string{ |
| 88 | "short", |
| 89 | "longer", |
| 90 | "longest", |
| 91 | } |
| 92 | expected := []string{ |
| 93 | " short", |
| 94 | " longer", |
| 95 | "longest", |
| 96 | } |
| 97 | |
| 98 | 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, expected, Rjustscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/Rjust().(unjust)) |
| 99 | } |
| 100 | |
| 101 | func TestLjustLeftJustifiesStringscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/TestLjustLeftJustifiesString().(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#) { |
| 102 | unjust := []string{ |
| 103 | "short", |
| 104 | "longer", |
| 105 | "longest", |
| 106 | } |
| 107 | expected := []string{ |
| 108 | "short ", |
| 109 | "longer ", |
| 110 | "longest", |
| 111 | } |
| 112 | |
| 113 | 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, expected, Ljustscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/Ljust().(unjust)) |
| 114 | } |
| 115 | |
| 116 | func TestIndentIndentsStringsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/TestIndentIndentsStrings().(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#) { |
| 117 | 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, "\tfoo\n\tbar", Indentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/Indent().("foo\nbar")) |
| 118 | } |
| 119 | |
| 120 | func TestIndentIndentsSingleLineStringsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/TestIndentIndentsSingleLineStrings().(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#) { |
| 121 | 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, "\tfoo", Indentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/Indent().("foo")) |
| 122 | } |
| 123 | |
| 124 | func TestIndentReturnsEmptyStringsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/TestIndentReturnsEmptyStrings().(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#) { |
| 125 | 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, "", Indentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/Indent().("")) |
| 126 | } |
| 127 | |
| 128 | func TestUndentRemovesLeadingWhitespacescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/TestUndentRemovesLeadingWhitespace().(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#) { |
| 129 | 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, "foo", Undentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/Undent().("\t\t\tfoo")) |
| 130 | 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, "foo", Undentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/Undent().("foo")) |
| 131 | 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, "foo", Undentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/Undent().(" foo")) |
| 132 | } |
| 133 | |
| 134 | func TestUndentRemovesPreservesLinebreaksscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/TestUndentRemovesPreservesLinebreaks().(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#) { |
| 135 | // No leading space |
| 136 | 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, "\r\nfoo", Undentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/Undent().("\r\nfoo")) |
| 137 | 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, "foo\r\n", Undentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/Undent().("foo\r\n")) |
| 138 | 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, "\r\nfoo\r\n", Undentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/Undent().("\r\nfoo\r\n")) |
| 139 | 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, "\nfoo", Undentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/Undent().("\nfoo")) |
| 140 | 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, "foo\n", Undentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/Undent().("foo\n")) |
| 141 | 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, "\nfoo\n", Undentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/Undent().("\nfoo\n")) |
| 142 | |
| 143 | // Trim leading space |
| 144 | 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, "\r\nfoo", Undentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/Undent().("\r\n foo")) |
| 145 | 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, "foo\r\n", Undentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/Undent().(" foo\r\n")) |
| 146 | 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, "\r\nfoo\r\n", Undentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/Undent().("\r\n foo\r\n")) |
| 147 | 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, "\nfoo", Undentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/Undent().("\n foo")) |
| 148 | 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, "foo\n", Undentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/Undent().(" foo\n")) |
| 149 | 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, "\nfoo\n", Undentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/Undent().("\n foo\n")) |
| 150 | |
| 151 | // Preserve trailing space |
| 152 | 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, "\r\nfoo ", Undentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/Undent().("\r\nfoo ")) |
| 153 | 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, "foo \r\n", Undentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/Undent().("foo \r\n")) |
| 154 | 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, "\r\nfoo \r\n", Undentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/Undent().("\r\nfoo \r\n")) |
| 155 | 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, "\nfoo ", Undentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/Undent().("\nfoo ")) |
| 156 | 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, "foo \n", Undentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/Undent().("foo \n")) |
| 157 | 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, "\nfoo \n", Undentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/Undent().("\nfoo \n")) |
| 158 | |
| 159 | // Trim leading space, preserve trailing space |
| 160 | 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, "\r\nfoo ", Undentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/Undent().("\r\n foo ")) |
| 161 | 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, "foo \r\n", Undentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/Undent().(" foo \r\n")) |
| 162 | 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, "\r\nfoo \r\n", Undentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/Undent().("\r\n foo \r\n")) |
| 163 | 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, "\nfoo ", Undentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/Undent().("\n foo ")) |
| 164 | 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, "foo \n", Undentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/Undent().(" foo \n")) |
| 165 | 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, "\nfoo \n", Undentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/Undent().("\n foo \n")) |
| 166 | } |
| 167 | |
| 168 | func TestFormatFractionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/TestFormatFraction().(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#) { |
| 169 | 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, "1/1", FormatFractionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/FormatFraction().(1, 1)) |
| 170 | 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, "33/100", FormatFractionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/FormatFraction().(33, 100)) |
| 171 | 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, "9876543/1234567890", FormatFractionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/FormatFraction().(9876543, 1234567890)) |
| 172 | |
| 173 | // Allow numerator to exceed denominator |
| 174 | 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, "5000/200", FormatFractionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/FormatFraction().(5000, 200)) |
| 175 | |
| 176 | // Allow zeroes in denominator |
| 177 | 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, "0/0", FormatFractionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/FormatFraction().(0, 0)) |
| 178 | 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, "99/0", FormatFractionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/FormatFraction().(99, 0)) |
| 179 | |
| 180 | // Adjust unknown denominator to match length of numerator |
| 181 | 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, "0/?", FormatFractionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/FormatFraction().(0, -1)) |
| 182 | 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, "1/?", FormatFractionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/FormatFraction().(1, -1)) |
| 183 | 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, "88/??", FormatFractionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/FormatFraction().(88, -88)) |
| 184 | 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, "1138/????", FormatFractionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/FormatFraction().(1138, -1)) |
| 185 | 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, "6345789/???????", FormatFractionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/FormatFraction().(6345789, -1)) |
| 186 | } |