1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Corrections to the 'filepath_normalize' test suite helper procedure.

FossilOrigin-Name: 32f4d04470bf953b08eea285543f16e03de13d5448c1ebccbba1578ca3b5363e
This commit is contained in:
mistachkin
2021-02-03 19:38:40 +00:00
parent 17b74817c0
commit 8c333cfc0d
3 changed files with 10 additions and 10 deletions

View File

@ -908,8 +908,8 @@ proc catchcmdex {db {cmd ""}} {
proc filepath_normalize {p} {
# test cases should be written to assume "unix"-like file paths
if {$::tcl_platform(platform)!="unix"} {
# lreverse*2 as a hack to remove any unneeded {} after the string map
lreverse [lreverse [string map {\\ /} [regsub -nocase -all {[a-z]:[/\\]+} $p {/}]]]
string map [list \\ / \{/ / .db\} .db] \
[regsub -nocase -all {[a-z]:[/\\]+} $p {/}]
} {
set p
}