mirror of
https://github.com/glebarez/go-sqlite.git
synced 2025-10-13 19:43:46 +08:00
windows/amd64: regenerate
This commit is contained in:
31
testdata/tcl/win32longpath.test
vendored
31
testdata/tcl/win32longpath.test
vendored
@@ -15,6 +15,22 @@
|
||||
|
||||
if {$tcl_platform(platform)!="windows"} return
|
||||
|
||||
proc get_goversion {} {
|
||||
if {$::tcl_platform(platform) eq "windows"} {
|
||||
if {[info exists ::env(ComSpec)]} {
|
||||
set comSpec $::env(ComSpec)
|
||||
} else {
|
||||
# NOTE: Hard-code the typical default value.
|
||||
set comSpec {C:\Windows\system32\cmd.exe}
|
||||
}
|
||||
return [string map [list \\ /] \
|
||||
[string trim [exec -- $comSpec /c go version ]]]
|
||||
} else {
|
||||
return [go version]
|
||||
}
|
||||
}
|
||||
|
||||
set goVer [get_goversion]
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
set testprefix win32longpath
|
||||
@@ -72,9 +88,18 @@ set uri(1d) file:///$uriPath(3b)/test.db
|
||||
set uri(1e) file://localhost/$uriPath(3a)\\test.db
|
||||
set uri(1f) file://localhost/$uriPath(3b)/test.db
|
||||
|
||||
do_test 1.3 {
|
||||
list [catch {sqlite3 db2 [string range $fileName 4 end]} msg] $msg
|
||||
} {1 {unable to open database file}}
|
||||
# Starting with Windows 10 v1607 OSBuild 14393, long paths are supported
|
||||
# Go 1.17 utilizes this capability and a result this test will fail
|
||||
# because the path CAN be created.
|
||||
|
||||
if {[string first "1.17" $goVer] < 0} {
|
||||
|
||||
do_test 1.3 {
|
||||
list [catch {sqlite3 db2 [string range $fileName 4 end]} msg] $msg
|
||||
} {1 {unable to open database file}}
|
||||
} else {
|
||||
puts "win32longpath-1.3... skipped"
|
||||
}
|
||||
|
||||
sqlite3 db3 $fileName -vfs win32-longpath
|
||||
|
||||
|
Reference in New Issue
Block a user