Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 20331bb4b66a0936aa3c176f358fb45367d2afcc
Ticket: 575853ffffffffffffffffffffffffffffffffff
source.test needs writable .
User & Date: dgp on 2002-07-01 07:13:06
Changes

  1. assignee changed to: "das"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    
    See Tcl Bug 575817.
    
    source.test fails:
    
    ==== source-1.1 source command FAILED
    ==== Contents of test case:
    
        set x "old x value"
        set y "old y value"
        set z "old z value"
        makeFile {
            set x 22
            set y 33
            set z 44
        } source.file
        source source.file
        list $x $y $z
    
    ---- Result was:
    couldn't read file "source.file": no such file or directory
    ---- Result should have been (exact matching):
    22 33 44
    ---- Test generated error; Return code was: 1
    ---- Return code should have been one of: 0 2
    ==== source-1.1 FAILED
    
    
    ==== source-1.2 source command FAILED
    ==== Contents of test case:
    
        makeFile {list result} source.file
        source source.file
    
    ---- Result was:
    couldn't read file "source.file": no such file or directory
    ---- Result should have been (exact matching):
    result
    ---- Test generated error; Return code was: 1
    ---- Return code should have been one of: 0 2
    ==== source-1.2 FAILED
    
    
    ==== source-1.3 source command FAILED
    ==== Contents of test case:
    
        set y {\ }
    
        set fd [open source.file w]
        fconfigure $fd -translation lf
        puts -nonewline $fd "list a b c "
        puts $fd [string index $y 0]
        puts $fd "d e f"
        close $fd
    
        source source.file
    
    ---- Result was:
    couldn't open "source.file": permission denied
    ---- Result should have been (exact matching):
    a b c d e f
    ---- Test generated error; Return code was: 1
    ---- Return code should have been one of: 0 2
    ==== source-1.3 FAILED
    
    
    ==== source-2.3 source error conditions FAILED
    ==== Contents of test case:
    
        makeFile {
            set x 146
            error "error in sourced file"
            set y $x
        } source.file
        list [catch {source source.file} msg] $msg $errorInfo
    
    ---- Result was:
    1 {couldn't read file "source.file": no such file or
    directory} {couldn't read file "source.file": no such
    file or directory
        while executing
    "source source.file"}
    ---- Result should have been (exact matching):
    1 {error in sourced file} {error in sourced file
        while executing
    "error "error in sourced file""
        (file "source.file" line 3)
        invoked from within
    "source source.file"}
    ==== source-2.3 FAILED
    
    
    ==== source-2.4 source error conditions FAILED
    ==== Contents of test case:
    
        makeFile {break} source.file
        catch {source source.file}
    
    ---- Result was:
    1
    ---- Result should have been (exact matching):
    3
    ==== source-2.4 FAILED
    
    
    ==== source-2.5 source error conditions FAILED
    ==== Contents of test case:
    
        makeFile {continue} source.file
        catch {source source.file}
    
    ---- Result was:
    1
    ---- Result should have been (exact matching):
    4
    ==== source-2.5 FAILED
    
    
    ==== source-3.1 return in middle of source file FAILED
    ==== Contents of test case:
    
        makeFile {
            set x new-x
            return allDone
            set y new-y
        } source.file
        set x old-x
        set y old-y
        set z [source source.file]
        list $x $y $z
    
    ---- Result was:
    couldn't read file "source.file": no such file or directory
    ---- Result should have been (exact matching):
    new-x old-y allDone
    ---- Test generated error; Return code was: 1
    ---- Return code should have been one of: 0 2
    ==== source-3.1 FAILED
    
    
    ==== source-3.2 return with special code etc. FAILED
    ==== Contents of test case:
    
        makeFile {
            set x new-x
            return -code break "Silly result"
            set y new-y
        } source.file
        list [catch {source source.file} msg] $msg
    
    ---- Result was:
    1 {couldn't read file "source.file": no such file or
    directory}
    ---- Result should have been (exact matching):
    3 {Silly result}
    ==== source-3.2 FAILED
    
    
    ==== source-3.3 return with special code etc. FAILED
    ==== Contents of test case:
    
        makeFile {
            set x new-x
            return -code error "Simulated error"
            set y new-y
        } source.file
        list [catch {source source.file} msg] $msg
    $errorInfo $errorCode
    
    ---- Result was:
    1 {couldn't read file "source.file": no such file or
    directory} {couldn't read file "source.file": no such
    file or directory
        while executing
    "source source.file"} {POSIX ENOENT {no such file or
    directory}}
    ---- Result should have been (exact matching):
    1 {Simulated error} {Simulated error
        while executing
    "source source.file"} NONE
    ==== source-3.3 FAILED
    
    
    ==== source-3.4 return with special code etc. FAILED
    ==== Contents of test case:
    
        makeFile {
            set x new-x
            return -code error -errorinfo "Simulated
    errorInfo stuff"
            set y new-y
        } source.file
        list [catch {source source.file} msg] $msg
    $errorInfo $errorCode
    
    ---- Result was:
    1 {couldn't read file "source.file": no such file or
    directory} {couldn't read file "source.file": no such
    file or directory
        while executing
    "source source.file"} {POSIX ENOENT {no such file or
    directory}}
    ---- Result should have been (exact matching):
    1 {} {Simulated errorInfo stuff
        invoked from within
    "source source.file"} NONE
    ==== source-3.4 FAILED
    
    
    ==== source-3.5 return with special code etc. FAILED
    ==== Contents of test case:
    
        makeFile {
            set x new-x
            return -code error -errorinfo "Simulated
    errorInfo stuff"  -errorcode {a b c}
            set y new-y
        } source.file
        list [catch {source source.file} msg] $msg
    $errorInfo $errorCode
    
    ---- Result was:
    1 {couldn't read file "source.file": no such file or
    directory} {couldn't read file "source.file": no such
    file or directory
        while executing
    "source source.file"} {POSIX ENOENT {no such file or
    directory}}
    ---- Result should have been (exact matching):
    1 {} {Simulated errorInfo stuff
        invoked from within
    "source source.file"} {a b c}
    ==== source-3.5 FAILED
    
    
    ==== source-6.1 source is binary ok FAILED
    ==== Contents of test case:
    
        set x {}
        makeFile [list set x "a b\0c"] source.file
        source source.file
        string length $x
    
    ---- Result was:
    couldn't read file "source.file": no such file or directory
    ---- Result should have been (exact matching):
    5
    ---- Test generated error; Return code was: 1
    ---- Return code should have been one of: 0 2
    ==== source-6.1 FAILED
    
    
    ==== source-6.2 source skips everything after Ctrl-Z:
    Bug 2040 FAILED
    ==== Contents of test case:
    
        set x {}
        makeFile [list set x "ab\32c"] source.file
        source source.file
        string length $x
    
    ---- Result was:
    couldn't read file "source.file": no such file or directory
    ---- Result should have been (exact matching):
    2
    ---- Test generated error; Return code was: 1
    ---- Return code should have been one of: 0 2
    ==== source-6.2 FAILED
    
    
  4. foundin changed to: "obsolete: 8.4a5"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "dgp"
  9. subsystem changed to: "67. [resource] (obsolete)"
  10. title changed to: "source.test needs writable ."
  11. type changed to: "Bug"