Check-in [775400ee76]
Not logged in

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

Overview
Comment:add selected tcl upstream changes
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | trunk
Files: files | file ages | folders
SHA1:775400ee7692f805627c0d2cdcba5cfddda203bf
User & Date: chw 2022-11-21 02:33:17
Context
2022-11-21
02:33
add selected tcl upstream changes Leaf check-in: 775400ee76 user: chw tags: trunk
2022-11-20
20:20
add libxft upstream changes check-in: b2aecdac0b user: chw tags: trunk
Changes

Changes to jni/tcl/tests/http.test.

26
27
28
29
30
31
32


33
34
35
36
37
38
39
...
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
...
464
465
466
467
468
469
470


471
472
473
474
475
476
477
478
479
480
481
482
483
	$interp eval [list set http2 "running"]
	$interp eval [list set argv $argv]
	$interp eval [list source [info script]]
	interp delete $interp
	return
    }
}



proc bgerror {args} {
    global errorInfo
    puts stderr "http.test bgerror"
    puts stderr [join $args]
    puts stderr $errorInfo
}
................................................................................
} -cleanup {
    http::config -urlencoding $oldenc
} -result {utf-8 iso8859-1}

test http-2.1 {http::reset} {
    catch {http::reset http#1}
} 0
test http-2.2 {http::CharsetToEncoding} {
    http::CharsetToEncoding iso-8859-11
} iso8859-11
test http-2.3 {http::CharsetToEncoding} {
    http::CharsetToEncoding iso-2022-kr
} iso2022-kr
test http-2.4 {http::CharsetToEncoding} {
    http::CharsetToEncoding shift-jis
} shiftjis
test http-2.5 {http::CharsetToEncoding} {
    http::CharsetToEncoding windows-437
} cp437
test http-2.6 {http::CharsetToEncoding} {
    http::CharsetToEncoding latin5
} iso8859-9
test http-2.7 {http::CharsetToEncoding} {
    http::CharsetToEncoding latin1
} iso8859-1
test http-2.8 {http::CharsetToEncoding} {
    http::CharsetToEncoding latin4
} binary

test http-3.1 {http::geturl} -returnCodes error -body {
    http::geturl -bogus flag
} -result {Unknown option flag, can be: -binary, -blocksize, -channel, -command, -handler, -headers, -keepalive, -method, -myaddr, -progress, -protocol, -query, -queryblocksize, -querychannel, -queryprogress, -strict, -timeout, -type, -validate}
test http-3.2 {http::geturl} -returnCodes error -body {
................................................................................
# Bug 838e99a76d
test http-3.33 {http::geturl application/xml is text} -body {
    set token [http::geturl "$xmlurl"]
    scan [http::data $token] "<%\[^>]>%c<%\[^>]>"
} -cleanup {
    catch { http::cleanup $token }
} -result {test 4660 /test}


test http-3.34 {http::geturl -headers not a list} -returnCodes error -body {
    http::geturl http://test/t -headers \"
} -result {Bad value for -headers ("), must be list}
test http-3.35 {http::geturl -headers not even number of elements} -returnCodes error -body {
    http::geturl http://test/t -headers {List Length 3}
} -result {Bad value for -headers (List Length 3), number of list elements must be even}

test http-4.1 {http::Event} -body {
    set token [http::geturl $url -keepalive 0]
    upvar #0 $token data
    array set meta $data(meta)
    expr {($data(totalsize) == $meta(Content-Length))}
} -cleanup {







>
>







 







|


|


|


|


|


|


|







 







>
>


|


|







26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
...
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
...
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
	$interp eval [list set http2 "running"]
	$interp eval [list set argv $argv]
	$interp eval [list source [info script]]
	interp delete $interp
	return
    }
}
testConstraint http2.9.7 [package vsatisfies [package provide http] 2.9.7]
testConstraint http2.9.8 [package vsatisfies [package provide http] 2.9.8]

proc bgerror {args} {
    global errorInfo
    puts stderr "http.test bgerror"
    puts stderr [join $args]
    puts stderr $errorInfo
}
................................................................................
} -cleanup {
    http::config -urlencoding $oldenc
} -result {utf-8 iso8859-1}

test http-2.1 {http::reset} {
    catch {http::reset http#1}
} 0
test http-2.2 {http::CharsetToEncoding} http2.9.7 {
    http::CharsetToEncoding iso-8859-11
} iso8859-11
test http-2.3 {http::CharsetToEncoding} http2.9.7 {
    http::CharsetToEncoding iso-2022-kr
} iso2022-kr
test http-2.4 {http::CharsetToEncoding} http2.9.7 {
    http::CharsetToEncoding shift-jis
} shiftjis
test http-2.5 {http::CharsetToEncoding} http2.9.7 {
    http::CharsetToEncoding windows-437
} cp437
test http-2.6 {http::CharsetToEncoding} http2.9.7 {
    http::CharsetToEncoding latin5
} iso8859-9
test http-2.7 {http::CharsetToEncoding} http2.9.7 {
    http::CharsetToEncoding latin1
} iso8859-1
test http-2.8 {http::CharsetToEncoding} http2.9.7 {
    http::CharsetToEncoding latin4
} binary

test http-3.1 {http::geturl} -returnCodes error -body {
    http::geturl -bogus flag
} -result {Unknown option flag, can be: -binary, -blocksize, -channel, -command, -handler, -headers, -keepalive, -method, -myaddr, -progress, -protocol, -query, -queryblocksize, -querychannel, -queryprogress, -strict, -timeout, -type, -validate}
test http-3.2 {http::geturl} -returnCodes error -body {
................................................................................
# Bug 838e99a76d
test http-3.33 {http::geturl application/xml is text} -body {
    set token [http::geturl "$xmlurl"]
    scan [http::data $token] "<%\[^>]>%c<%\[^>]>"
} -cleanup {
    catch { http::cleanup $token }
} -result {test 4660 /test}


test http-3.34 {http::geturl -headers not a list} -returnCodes error -body {
    http::geturl http://test/t -headers \"
} -constraints http2.9.8 -result {Bad value for -headers ("), must be list}
test http-3.35 {http::geturl -headers not even number of elements} -returnCodes error -body {
    http::geturl http://test/t -headers {List Length 3}
} -constraints http2.9.8 -result {Bad value for -headers (List Length 3), number of list elements must be even}

test http-4.1 {http::Event} -body {
    set token [http::geturl $url -keepalive 0]
    upvar #0 $token data
    array set meta $data(meta)
    expr {($data(totalsize) == $meta(Content-Length))}
} -cleanup {