mirror of
				https://gitlab.com/cznic/sqlite.git
				synced 2025-10-30 02:25:49 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			37 lines
		
	
	
		
			753 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			753 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| // Copyright 2017 The Sqlite Authors. All rights reserved.
 | |
| // Use of this source code is governed by a BSD-style
 | |
| // license that can be found in the LICENSE file.
 | |
| 
 | |
| //go:build ignore || (cgo && cgotest)
 | |
| // +build ignore cgo,cgotest
 | |
| 
 | |
| package sqlite // import "modernc.org/sqlite"
 | |
| 
 | |
| import (
 | |
| 	"database/sql"
 | |
| 	"os"
 | |
| 	"path/filepath"
 | |
| 	"testing"
 | |
| 
 | |
| 	_ "github.com/mattn/go-sqlite3"
 | |
| )
 | |
| 
 | |
| // https://gitlab.com/cznic/sqlite/-/issues/65
 | |
| func TestIssue65CGo(t *testing.T) {
 | |
| 	tempDir, err := os.MkdirTemp("", "")
 | |
| 	if err != nil {
 | |
| 		t.Fatal(err)
 | |
| 	}
 | |
| 
 | |
| 	defer func() {
 | |
| 		os.RemoveAll(tempDir)
 | |
| 	}()
 | |
| 
 | |
| 	db, err := sql.Open("sqlite3", filepath.Join(tempDir, "testissue65.sqlite"))
 | |
| 	if err != nil {
 | |
| 		t.Fatalf("Failed to open database: %v", err)
 | |
| 	}
 | |
| 
 | |
| 	testIssue65(t, db, false)
 | |
| }
 |