(t *testing.T)
| 133 | } |
| 134 | |
| 135 | func TestExt(t *testing.T) { |
| 136 | t.Parallel() |
| 137 | testExt(t, "", "") |
| 138 | testExt(t, ".", ".") |
| 139 | testExt(t, ".txt", ".txt") |
| 140 | testExt(t, ".txt", ".js.txt") |
| 141 | testExt(t, "", "foo") |
| 142 | testExt(t, ".txt", "foo.txt") |
| 143 | testExt(t, ".txt", "foo.js.txt") |
| 144 | testExt(t, "", ".\\foo") |
| 145 | testExt(t, ".txt", ".\\foo.txt") |
| 146 | testExt(t, ".txt", ".\\foo.js.txt") |
| 147 | testExt(t, "", ".\\foo\\bar") |
| 148 | testExt(t, ".txt", ".\\foo\\bar.txt") |
| 149 | testExt(t, ".txt", ".\\foo\\bar.txt") |
| 150 | testExt(t, ".txt", ".\\foo\\bar.js.txt") |
| 151 | testExt(t, "", "..\\foo\\bar") |
| 152 | testExt(t, ".txt", "..\\foo\\bar.txt") |
| 153 | testExt(t, ".txt", "..\\foo\\bar.js.txt") |
| 154 | testExt(t, ".txt", "\\\\127.0.0.1\\$d\\foo.txt") |
| 155 | testExt(t, ".txt", "c:\\foo.txt") |
| 156 | } |
| 157 | |
| 158 | func testExt(t *testing.T, expected string, input string) { |
| 159 | assert.Equal(t, expected, Ext(input)) |
nothing calls this directly
no test coverage detected
searching dependent graphs…