1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Fix for test issues when there is no current directory support due to being compiled for WinRT.

FossilOrigin-Name: a811cb01528beab8afd899411d187d4d960ddcc8
This commit is contained in:
mistachkin
2012-03-06 03:00:49 +00:00
parent c548465435
commit 4a41f34552
8 changed files with 67 additions and 26 deletions

View File

@ -20,6 +20,7 @@
# Commands to manipulate the db and the file-system at a high level:
#
# is_relative_file
# test_pwd
# copy_file FROM TO
# delete_file FILENAME
# drop_all_tables ?DB?
@ -200,6 +201,28 @@ proc is_relative_file { file } {
return [expr {[file pathtype $file] != "absolute"}]
}
# If the VFS supports using the current directory, returns [pwd];
# otherwise, it returns only the provided suffix string (which is
# empty by default).
#
proc test_pwd { args } {
if {[llength $args] > 0} {
set suffix1 [lindex $args 0]
if {[llength $args] > 1} {
set suffix2 [lindex $args 1]
} else {
set suffix2 $suffix1
}
} else {
set suffix1 ""; set suffix2 ""
}
ifcapable curdir {
return "[pwd]$suffix1"
} else {
return $suffix2
}
}
# Delete a file or directory
#
proc delete_file {args} {