MCPcopy
hub / github.com/sqlc-dev/sqlc / TestFollowSymlinks

Function TestFollowSymlinks

internal/sql/sqlpath/read_test.go:178–198  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

176}
177
178func TestFollowSymlinks(t *testing.T) {
179 // Arrange
180 paths := []string{"testdata/symlink", "testdata/file1.symlink.sql"}
181
182 // Act
183 result, err := Glob(paths)
184
185 // Assert
186 expected := []string{
187 filepath.Join("testdata", "symlink", "file1.sql"),
188 filepath.Join("testdata", "symlink", "file1.symlink.sql"),
189 filepath.Join("testdata", "symlink", "file2.sql"),
190 filepath.Join("testdata", "file1.symlink.sql"),
191 }
192 if !cmp.Equal(result, expected) {
193 t.Errorf("Expected %v, but got %v", expected, result)
194 }
195 if err != nil {
196 t.Errorf("Expected no error, but got %v", err)
197 }
198}
199
200func TestGlobPattern(t *testing.T) {
201 // Arrange

Callers

nothing calls this directly

Calls 3

GlobFunction · 0.85
JoinMethod · 0.45
EqualMethod · 0.45

Tested by

no test coverage detected