Menu

#2427 A few tests in io.test & ioCmd.test fail when + in path

obsolete: 8.4.4
closed-fixed
8
2003-10-07
2003-07-22
No

Tests: io-40.6, io-40.11, io-40.12, io-40.14,
iocmd-12.2, iocmd-12.3 and iocmd-12.5 all fail if make
test is run from a director which contains a + (or any
other character which [regexp] and [regsub] treat
specially) because the [regsub] in the test ends up not
matching it's input.

An example:

==== io-40.6 POSIX open access modes: EXCL FAILED
==== Contents of test case:

removeFile test3
set f [open $path(test3) w]
puts $f xyzzy
close $f
set msg [list [catch {open $path(test3) {WRONLY
CREAT EXCL}} msg] $msg]
regsub " already " $msg " " msg
regsub [file join {} $path(test3)] $msg "test3" msg
string tolower $msg

---- Result was:
1 {couldn't open
"/usr/users/mcleverl/testbuild/build01+threads+langinfo+shared+load+symbols/test3":
file exists}
---- Result should have been (exact matching):
1 {couldn't open "test3": file exists}
==== io-40.6 FAILED

Discussion

  • Michael A. Cleverly

    Patch for io.test

     
  • Michael A. Cleverly

    ioCmd.test.patch

     
  • Michael A. Cleverly

    Logged In: YES
    user_id=22080

    I've uploaded two patches which use [string map] to properly
    escape all the characters that have special meaning to [regsub].

     
  • Don Porter

    Don Porter - 2003-10-02
    • priority: 5 --> 8
    • assigned_to: mdejong --> dgp
     
  • Don Porter

    Don Porter - 2003-10-07
    • labels: 105687 --> 25. Channel System
    • status: open --> closed-fixed
     
  • Don Porter

    Don Porter - 2003-10-07
    • milestone: --> obsolete: 8.4.4
     
  • Don Porter

    Don Porter - 2003-10-07

    Logged In: YES
    user_id=80530

    corrected for 8.4.5+ by making
    good use of the tcltest 2 features.