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:
@ -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} {
|
||||
|
Reference in New Issue
Block a user