@@ -58,11 +58,11 @@ func TestExamples(t *testing.T) {
5858 t .Parallel ()
5959 path := filepath .Join (examples , tc )
6060 var stderr bytes.Buffer
61- opts := & cmd.Options {
62- Env : cmd.Env {},
61+ o := & cmd.Options {
62+ Env : cmd.Env {Debug : opts . DebugFromString ( "" ) },
6363 Stderr : & stderr ,
6464 }
65- output , err := cmd .Generate (ctx , path , "" , opts )
65+ output , err := cmd .Generate (ctx , path , "" , o )
6666 if err != nil {
6767 t .Fatalf ("sqlc generate failed: %s" , stderr .String ())
6868 }
@@ -311,7 +311,7 @@ func cmpDirectory(t *testing.T, dir string, actual map[string]string) {
311311 if file .IsDir () {
312312 return nil
313313 }
314- if ! strings .HasSuffix (path , ".go" ) && ! strings .HasSuffix (path , ".kt" ) && ! strings .HasSuffix (path , ".py" ) && ! strings .HasSuffix (path , ".json" ) && ! strings .HasSuffix (path , ".txt" ) {
314+ if ! strings .HasSuffix (path , ".go" ) && ! strings .HasSuffix (path , ".kt" ) && ! strings .HasSuffix (path , ".py" ) && ! strings .HasSuffix (path , ".json" ) && ! strings .HasSuffix (path , ".txt" ) && ! strings . HasSuffix ( path , ".rs" ) {
315315 return nil
316316 }
317317 // TODO: Figure out a better way to ignore certain files
@@ -330,6 +330,10 @@ func cmpDirectory(t *testing.T, dir string, actual map[string]string) {
330330 if strings .HasSuffix (path , "_test.go" ) || strings .Contains (path , "src/test/" ) {
331331 return nil
332332 }
333+ // Skip plugin source files - they are not generated by sqlc
334+ if strings .Contains (path , "/plugins/" ) {
335+ return nil
336+ }
333337 if strings .Contains (path , "/python/.venv" ) || strings .Contains (path , "/python/src/tests/" ) ||
334338 strings .HasSuffix (path , "__init__.py" ) || strings .Contains (path , "/python/src/dbtest/" ) ||
335339 strings .Contains (path , "/python/.mypy_cache" ) {
0 commit comments