aboutsummaryrefslogtreecommitdiff
path: root/test/win32longpath.test
diff options
context:
space:
mode:
Diffstat (limited to 'test/win32longpath.test')
-rw-r--r--test/win32longpath.test31
1 files changed, 30 insertions, 1 deletions
diff --git a/test/win32longpath.test b/test/win32longpath.test
index 9e9ed359c..01b4af70a 100644
--- a/test/win32longpath.test
+++ b/test/win32longpath.test
@@ -24,7 +24,8 @@ do_test 1.0 {
} win32
db close
-set path [file nativename [get_pwd]]
+set rawPath [get_pwd]
+set path [file nativename $rawPath]
sqlite3 db [file join $path test.db] -vfs win32-longpath
do_test 1.1 {
@@ -45,16 +46,32 @@ do_test 1.2 {
} {1 2 3 4}
set longPath(1) \\\\?\\$path\\[pid]
+set uriPath(1a) %5C%5C%3F%5C$path\\[pid]
+set uriPath(1b) %5C%5C%3F%5C$rawPath/[pid]
+
make_win32_dir $longPath(1)
set longPath(2) $longPath(1)\\[string repeat X 255]
+set uriPath(2a) $uriPath(1a)\\[string repeat X 255]
+set uriPath(2b) $uriPath(1b)/[string repeat X 255]
+
make_win32_dir $longPath(2)
set longPath(3) $longPath(2)\\[string repeat Y 255]
+set uriPath(3a) $uriPath(2a)\\[string repeat Y 255]
+set uriPath(3b) $uriPath(2b)/[string repeat Y 255]
+
make_win32_dir $longPath(3)
set fileName $longPath(3)\\test.db
+set uri(1a) file:$uriPath(3a)\\test.db
+set uri(1b) file:$uriPath(3b)/test.db
+set uri(1c) file:///$uriPath(3a)\\test.db
+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}}
@@ -100,6 +117,18 @@ do_test 1.6 {
db3 close
# puts " Database exists \{[exists_win32_path $fileName]\}"
+foreach tn {1a 1b 1c 1d 1e 1f} {
+ sqlite3 db3 $uri($tn) -vfs win32-longpath -uri 1 -translatefilename 0
+
+ do_test 1.7.$tn {
+ db3 eval {
+ SELECT x FROM t1 ORDER BY x;
+ }
+ } {5 6 7 8 9 10 11 12}
+
+ db3 close
+}
+
do_delete_win32_file $fileName
# puts " Files remaining \{[find_win32_file $longPath(3)\\*]\}"