/ Check-in [30dd4f88]
Login

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

Overview
Comment:Update filepath_normalize for unix.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:30dd4f887989354b5d01cc80bd9c4bd3528d3ae1
User & Date: shaneh 2011-06-21 19:38:16
Context
2011-06-21
19:39
Fix typo in previous tester.tcl commit. check-in: c2e5faca user: shaneh tags: trunk
19:38
Update filepath_normalize for unix. check-in: 30dd4f88 user: shaneh tags: trunk
19:30
Update a few of the uri tests to work on Windows. check-in: a2a0cd4a user: shaneh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/tester.tcl.

352
353
354
355
356
357
358
359
360
361


362
363
364
365
366
367
368
    puts " Ok"
  }
  flush stdout
}

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 {/}]]]


  }
}
proc do_filepath_test {name cmd expected} {
  uplevel [list do_test $name [
    subst -nocommands { filepath_normalize [ $cmd ] }
  ] [filepath_normalize $expected]]
}







|


>
>







352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
    puts " Ok"
  }
  flush stdout
}

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 {/}]]]
  } {
    set p
  }
}
proc do_filepath_test {name cmd expected} {
  uplevel [list do_test $name [
    subst -nocommands { filepath_normalize [ $cmd ] }
  ] [filepath_normalize $expected]]
}