/ Check-in [88963c33]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Merge test current directory value fix from trunk and fix uri tests.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | winrt
Files: files | file ages | folders
SHA1: 88963c33c19a051280f7f31bdc1b322d6837cf43
User & Date: mistachkin 2012-03-08 20:39:08
Context
2012-03-13
01:16
More changes required to compile for WinRT using VS 11 beta. Also, replace more APIs with their WinRT alternatives. check-in: 6b997d9c user: mistachkin tags: winrt
2012-03-08
20:39
Merge test current directory value fix from trunk and fix uri tests. check-in: 88963c33 user: mistachkin tags: winrt
20:28
On Windows, make sure the returned test current directory value does not contain any backslashes. check-in: efee39e6 user: mistachkin tags: trunk
20:22
Merge and manually resolve testing updates from trunk. check-in: 5eecdb44 user: mistachkin tags: winrt
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/tester.tcl.

153
154
155
156
157
158
159






160
161
162
163
164
165
166
167

# Return the string representing the name of the current directory.  On
# Windows, the result is "normalized" to whatever our parent command shell
# is using to prevent case-mismatch issues.
#
proc get_pwd {} {
  if {$::tcl_platform(platform) eq "windows"} {






    return [string trim [exec -- $::env(ComSpec) /c echo %CD%]]
  } else {
    return [pwd]
  }
}

# Copy file $from into $to. This is used because some versions of
# TCL for windows (notably the 8.4.1 binary package shipped with the







>
>
>
>
>
>
|







153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173

# Return the string representing the name of the current directory.  On
# Windows, the result is "normalized" to whatever our parent command shell
# is using to prevent case-mismatch issues.
#
proc get_pwd {} {
  if {$::tcl_platform(platform) eq "windows"} {
    #
    # NOTE: Cannot use [file normalize] here because it would alter the
    #       case of the result to what Tcl considers canonical, which would
    #       defeat the purpose of this procedure.
    #
    return [string map [list \\ /] \
        [string trim [exec -- $::env(ComSpec) /c echo %CD%]]]
  } else {
    return [pwd]
  }
}

# Copy file $from into $to. This is used because some versions of
# TCL for windows (notably the 8.4.1 binary package shipped with the

Changes to test/uri.test.

52
53
54
55
56
57
58





59
60
61





62
63

64
65
66
67
68
69
70
  16     file://localhostPWD/test.db%3Fhello  test.db?hello
} {
  

  ifcapable !curdir { if {$tn==3} break }

  if {$tcl_platform(platform)=="windows"} {





    if {$tn>14} break
  }






  set uri  [string map [list PWD/ [test_pwd /]] $uri]


  if {[file isdir $file]} {error "$file is a directory"}
  forcedelete $file
  do_test 1.$tn.1 { file exists $file } 0
  set DB [sqlite3_open $uri]
  do_test 1.$tn.2 { file exists $file } 1
  sqlite3_close $DB
  forcedelete $file







>
>
>
>
>

|
|
>
>
>
>
>
|
|
>







52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
  16     file://localhostPWD/test.db%3Fhello  test.db?hello
} {
  

  ifcapable !curdir { if {$tn==3} break }

  if {$tcl_platform(platform)=="windows"} {
    #
    # NOTE: Due to limits on legal characters for file names imposed by
    #       Windows, we must skip the final two tests here (i.e. the
    #       question mark is illegal in a file name on Windows).
    #
    if {$tn>14} break

    #
    # NOTE: On Windows, we need to account for the fact that the current
    #       directory does not start with a forward slash.
    #
    set uri  [string map [list PWD/ /[test_pwd /]] $uri]
  } else {
    set uri  [string map [list PWD/ [test_pwd /]] $uri]
  }

  if {[file isdir $file]} {error "$file is a directory"}
  forcedelete $file
  do_test 1.$tn.1 { file exists $file } 0
  set DB [sqlite3_open $uri]
  do_test 1.$tn.2 { file exists $file } 1
  sqlite3_close $DB
  forcedelete $file