diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2018-11-15 10:23:31 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2018-11-15 10:23:31 (GMT) |
commit | e348eadefd9b0713d7a81cbda827a45b5b50271b (patch) | |
tree | f87cef5aee268dfd1645136c740bcb02cbe801fd /tests/httpcookie.test | |
parent | b3d56cb3645f93ae374badaca88dd2559e0c5421 (diff) | |
download | tcl-e348eadefd9b0713d7a81cbda827a45b5b50271b.zip tcl-e348eadefd9b0713d7a81cbda827a45b5b50271b.tar.gz tcl-e348eadefd9b0713d7a81cbda827a45b5b50271b.tar.bz2 |
Stop more crashes on Travis
Diffstat (limited to 'tests/httpcookie.test')
-rw-r--r-- | tests/httpcookie.test | 260 |
1 files changed, 138 insertions, 122 deletions
diff --git a/tests/httpcookie.test b/tests/httpcookie.test index d4acad9..8835791 100644 --- a/tests/httpcookie.test +++ b/tests/httpcookie.test @@ -12,44 +12,59 @@ package require tcltest 2 namespace import -force ::tcltest::* -testConstraint sqlite3 [expr {![catch { +testConstraint notOSXtravis [apply {{} { + upvar 1 env(TRAVIS_OSX_IMAGE) travis + return [expr {![info exists travis] || ![string match xcode* $travis]}] +}}] +testConstraint sqlite3 [expr {[testConstraint notOSXtravis] && ![catch { package require sqlite3 }]}] -testConstraint cookiejar [expr {![catch { - if {[testConstraint sqlite3]} { - package require cookiejar - } +testConstraint cookiejar [expr {[testConstraint sqlite3] && ![catch { + package require cookiejar }]}] -test http-cookiejar-1.1 {cookie storage: packaging} {sqlite3 cookiejar} { +set COOKIEJAR_VERSION 0.1 +test http-cookiejar-1.1 "cookie storage: packaging" {notOSXtravis sqlite3 cookiejar} { package require cookiejar -} 0.1 -test http-cookiejar-1.2 {cookie storage: packaging} {sqlite3 cookiejar} { +} $COOKIEJAR_VERSION +test http-cookiejar-1.2 "cookie storage: packaging" {notOSXtravis sqlite3 cookiejar} { package require cookiejar package require cookiejar -} 0.1 +} $COOKIEJAR_VERSION -test http-cookiejar-2.1 {cookie storage: basics} -constraints {sqlite3 cookiejar} -body { +test http-cookiejar-2.1 "cookie storage: basics" -constraints { + notOSXtravis sqlite3 cookiejar +} -returnCodes error -body { http::cookiejar -} -returnCodes error -result {wrong # args: should be "http::cookiejar method ?arg ...?"} -test http-cookiejar-2.2 {cookie storage: basics} -constraints {sqlite3 cookiejar} -body { +} -result {wrong # args: should be "http::cookiejar method ?arg ...?"} +test http-cookiejar-2.2 "cookie storage: basics" -constraints { + notOSXtravis sqlite3 cookiejar +} -returnCodes error -body { http::cookiejar ? -} -returnCodes error -result {unknown method "?": must be configure, create, destroy or new} -test http-cookiejar-2.3 {cookie storage: basics} {sqlite3 cookiejar} { +} -result {unknown method "?": must be configure, create, destroy or new} +test http-cookiejar-2.3 "cookie storage: basics" -constraints { + notOSXtravis sqlite3 cookiejar +} -body { http::cookiejar configure -} {-domainfile -domainlist -domainrefresh -loglevel -offline -purgeold -retain -vacuumtrigger} -test http-cookiejar-2.4 {cookie storage: basics} -constraints {sqlite3 cookiejar} -body { +} -result {-domainfile -domainlist -domainrefresh -loglevel -offline -purgeold -retain -vacuumtrigger} +test http-cookiejar-2.4 "cookie storage: basics" -constraints { + notOSXtravis sqlite3 cookiejar +} -returnCodes error -body { http::cookiejar configure a b c d e -} -returnCodes error -result {wrong # args: should be "http::cookiejar configure ?optionName? ?optionValue?"} -test http-cookiejar-2.5 {cookie storage: basics} -constraints {sqlite3 cookiejar} -body { +} -result {wrong # args: should be "http::cookiejar configure ?optionName? ?optionValue?"} +test http-cookiejar-2.5 "cookie storage: basics" -constraints { + notOSXtravis sqlite3 cookiejar +} -returnCodes error -body { http::cookiejar configure a -} -returnCodes error -result {bad option "a": must be -domainfile, -domainlist, -domainrefresh, -loglevel, -offline, -purgeold, -retain, or -vacuumtrigger} -test http-cookiejar-2.6 {cookie storage: basics} -constraints {sqlite3 cookiejar} -body { +} -result {bad option "a": must be -domainfile, -domainlist, -domainrefresh, -loglevel, -offline, -purgeold, -retain, or -vacuumtrigger} +test http-cookiejar-2.6 "cookie storage: basics" -constraints { + notOSXtravis sqlite3 cookiejar +} -returnCodes error -body { http::cookiejar configure -d -} -returnCodes error -result {ambiguous option "-d": must be -domainfile, -domainlist, -domainrefresh, -loglevel, -offline, -purgeold, -retain, or -vacuumtrigger} -test http-cookiejar-2.7 {cookie storage: basics} -setup { +} -result {ambiguous option "-d": must be -domainfile, -domainlist, -domainrefresh, -loglevel, -offline, -purgeold, -retain, or -vacuumtrigger} +test http-cookiejar-2.7 "cookie storage: basics" -setup { set old [http::cookiejar configure -loglevel] -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { list [http::cookiejar configure -loglevel] \ [http::cookiejar configure -loglevel debug] \ [http::cookiejar configure -loglevel] \ @@ -58,9 +73,9 @@ test http-cookiejar-2.7 {cookie storage: basics} -setup { } -cleanup { http::cookiejar configure -loglevel $old } -result {info debug debug error error} -test http-cookiejar-2.8 {cookie storage: basics} -setup { +test http-cookiejar-2.8 "cookie storage: basics" -setup { set old [http::cookiejar configure -loglevel] -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { list [http::cookiejar configure -loglevel] \ [http::cookiejar configure -loglevel d] \ [http::cookiejar configure -loglevel i] \ @@ -69,49 +84,49 @@ test http-cookiejar-2.8 {cookie storage: basics} -setup { } -cleanup { http::cookiejar configure -loglevel $old } -result {info debug info warn error} -test http-cookiejar-2.9 {cookie storage: basics} -constraints {sqlite3 cookiejar} -body { +test http-cookiejar-2.9 "cookie storage: basics" -body { http::cookiejar configure -off -} -match glob -result * -test http-cookiejar-2.10 {cookie storage: basics} -setup { +} -constraints {notOSXtravis sqlite3 cookiejar} -match glob -result * +test http-cookiejar-2.10 "cookie storage: basics" -setup { set oldval [http::cookiejar configure -offline] -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { http::cookiejar configure -offline true } -cleanup { catch {http::cookiejar configure -offline $oldval} } -result 1 -test http-cookiejar-2.11 {cookie storage: basics} -setup { +test http-cookiejar-2.11 "cookie storage: basics" -setup { set oldval [http::cookiejar configure -offline] -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { http::cookiejar configure -offline nonbool } -cleanup { catch {http::cookiejar configure -offline $oldval} } -returnCodes error -result {expected boolean value but got "nonbool"} -test http-cookiejar-2.12 {cookie storage: basics} -setup { +test http-cookiejar-2.12 "cookie storage: basics" -setup { set oldval [http::cookiejar configure -purgeold] -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { http::cookiejar configure -purge nonint } -cleanup { catch {http::cookiejar configure -purgeold $oldval} } -returnCodes error -result {expected positive integer but got "nonint"} -test http-cookiejar-2.13 {cookie storage: basics} -setup { +test http-cookiejar-2.13 "cookie storage: basics" -setup { set oldval [http::cookiejar configure -domainrefresh] -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { http::cookiejar configure -domainref nonint } -cleanup { catch {http::cookiejar configure -domainrefresh $oldval} } -returnCodes error -result {expected positive integer but got "nonint"} -test http-cookiejar-2.14 {cookie storage: basics} -setup { +test http-cookiejar-2.14 "cookie storage: basics" -setup { set oldval [http::cookiejar configure -domainrefresh] -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { http::cookiejar configure -domainref -42 } -cleanup { catch {http::cookiejar configure -domainrefresh $oldval} } -returnCodes error -result {expected positive integer but got "-42"} -test http-cookiejar-2.15 {cookie storage: basics} -setup { +test http-cookiejar-2.15 "cookie storage: basics" -setup { set oldval [http::cookiejar configure -domainrefresh] set result unset set tracer [http::cookiejar create tracer] -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { oo::objdefine $tracer method PostponeRefresh {} { set ::result set next @@ -123,114 +138,115 @@ test http-cookiejar-2.15 {cookie storage: basics} -setup { catch {http::cookiejar configure -domainrefresh $oldval} } -result set -test http-cookiejar-3.1 {cookie storage: class} {sqlite3 cookiejar} { +test http-cookiejar-3.1 "cookie storage: class" {notOSXtravis sqlite3 cookiejar} { info object isa object http::cookiejar } 1 -test http-cookiejar-3.2 {cookie storage: class} {sqlite3 cookiejar} { +test http-cookiejar-3.2 "cookie storage: class" {notOSXtravis sqlite3 cookiejar} { info object isa class http::cookiejar } 1 -test http-cookiejar-3.3 {cookie storage: class} {sqlite3 cookiejar} { +test http-cookiejar-3.3 "cookie storage: class" {notOSXtravis sqlite3 cookiejar} { lsort [info object methods http::cookiejar] } {configure} -test http-cookiejar-3.4 {cookie storage: class} {sqlite3 cookiejar} { +test http-cookiejar-3.4 "cookie storage: class" {notOSXtravis sqlite3 cookiejar} { lsort [info object methods http::cookiejar -all] } {configure create destroy new} -test http-cookiejar-3.5 {cookie storage: class} -setup { +test http-cookiejar-3.5 "cookie storage: class" -setup { catch {rename ::cookiejar ""} -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { namespace eval :: {http::cookiejar create cookiejar} } -cleanup { catch {rename ::cookiejar ""} } -result ::cookiejar -test http-cookiejar-3.6 {cookie storage: class} -setup { +test http-cookiejar-3.6 "cookie storage: class" -setup { catch {rename ::cookiejar ""} -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { list [http::cookiejar create ::cookiejar] [info commands ::cookiejar] \ [::cookiejar destroy] [info commands ::cookiejar] } -cleanup { catch {rename ::cookiejar ""} } -result {::cookiejar ::cookiejar {} {}} -test http-cookiejar-3.7 {cookie storage: class} -setup { +test http-cookiejar-3.7 "cookie storage: class" -setup { catch {rename ::cookiejar ""} -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { http::cookiejar create ::cookiejar foo bar } -returnCodes error -cleanup { catch {rename ::cookiejar ""} } -result {wrong # args: should be "http::cookiejar create ::cookiejar ?path?"} -test http-cookiejar-3.8 {cookie storage: class} -setup { +test http-cookiejar-3.8 "cookie storage: class" -setup { catch {rename ::cookiejar ""} set f [makeFile "" cookiejar] file delete $f -} -constraints {sqlite3 cookiejar} -body { - http::cookiejar create ::cookiejar $f +} -constraints {notOSXtravis sqlite3 cookiejar} -body { + list [file exists $f] [http::cookiejar create ::cookiejar $f] \ + [file exists $f] } -cleanup { catch {rename ::cookiejar ""} removeFile $f -} -result ::cookiejar -test http-cookiejar-3.9 {cookie storage: class} -setup { +} -result {0 ::cookiejar 1} +test http-cookiejar-3.9 "cookie storage: class" -setup { catch {rename ::cookiejar ""} set f [makeFile "bogus content for a database" cookiejar] -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { http::cookiejar create ::cookiejar $f } -returnCodes error -cleanup { catch {rename ::cookiejar ""} removeFile $f } -match glob -result * -test http-cookiejar-3.10 {cookie storage: class} -setup { +test http-cookiejar-3.10 "cookie storage: class" -setup { catch {rename ::cookiejar ""} set dir [makeDirectory cookiejar] -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { http::cookiejar create ::cookiejar $dir } -returnCodes error -cleanup { catch {rename ::cookiejar ""} removeDirectory $dir -} -result {unable to open database file} +} -match glob -result * -test http-cookiejar-4.1 {cookie storage: instance} -setup { +test http-cookiejar-4.1 "cookie storage: instance" -setup { http::cookiejar create ::cookiejar -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { cookiejar } -returnCodes error -cleanup { ::cookiejar destroy } -result {wrong # args: should be "cookiejar method ?arg ...?"} -test http-cookiejar-4.2 {cookie storage: instance} -setup { +test http-cookiejar-4.2 "cookie storage: instance" -setup { http::cookiejar create ::cookiejar -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { cookiejar ? } -returnCodes error -cleanup { ::cookiejar destroy } -result {unknown method "?": must be destroy, forceLoadDomainData, getCookies, lookup, policyAllow or storeCookie} -test http-cookiejar-4.3 {cookie storage: instance} -setup { +test http-cookiejar-4.3 "cookie storage: instance" -setup { http::cookiejar create ::cookiejar -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { lsort [info object methods cookiejar -all] } -cleanup { ::cookiejar destroy } -result {destroy forceLoadDomainData getCookies lookup policyAllow storeCookie} -test http-cookiejar-4.4 {cookie storage: instance} -setup { +test http-cookiejar-4.4 "cookie storage: instance" -setup { http::cookiejar create ::cookiejar -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { cookiejar getCookies } -returnCodes error -cleanup { ::cookiejar destroy } -result {wrong # args: should be "cookiejar getCookies proto host path"} -test http-cookiejar-4.5 {cookie storage} -setup { +test http-cookiejar-4.5 "cookie storage" -setup { http::cookiejar create ::cookiejar -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { cookiejar getCookies http www.example.com / } -cleanup { ::cookiejar destroy } -result {} -test http-cookiejar-4.6 {cookie storage: instance} -setup { +test http-cookiejar-4.6 "cookie storage: instance" -setup { http::cookiejar create ::cookiejar -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { cookiejar storeCookie } -returnCodes error -cleanup { ::cookiejar destroy } -result {wrong # args: should be "cookiejar storeCookie options"} -test http-cookiejar-4.7 {cookie storage: instance} -setup { +test http-cookiejar-4.7 "cookie storage: instance" -setup { http::cookiejar create ::cookiejar -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { cookiejar storeCookie { key foo value bar @@ -243,10 +259,10 @@ test http-cookiejar-4.7 {cookie storage: instance} -setup { } -cleanup { ::cookiejar destroy } -result {} -test http-cookiejar-4.8 {cookie storage: instance} -setup { +test http-cookiejar-4.8 "cookie storage: instance" -setup { http::cookiejar create ::cookiejar oo::objdefine ::cookiejar export Database -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { cookiejar storeCookie { key foo value bar @@ -261,10 +277,10 @@ test http-cookiejar-4.8 {cookie storage: instance} -setup { } -cleanup { ::cookiejar destroy } -result 1 -test http-cookiejar-4.9 {cookie storage: instance} -setup { +test http-cookiejar-4.9 "cookie storage: instance" -setup { http::cookiejar create ::cookiejar oo::objdefine ::cookiejar export Database -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { cookiejar storeCookie { key foo value bar @@ -279,9 +295,9 @@ test http-cookiejar-4.9 {cookie storage: instance} -setup { } -cleanup { ::cookiejar destroy } -result 0 -test http-cookiejar-4.10 {cookie storage: instance} -setup { +test http-cookiejar-4.10 "cookie storage: instance" -setup { http::cookiejar create ::cookiejar -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { cookiejar storeCookie [dict replace { key foo value bar @@ -294,10 +310,10 @@ test http-cookiejar-4.10 {cookie storage: instance} -setup { } -cleanup { ::cookiejar destroy } -result {} -test http-cookiejar-4.11 {cookie storage: instance} -setup { +test http-cookiejar-4.11 "cookie storage: instance" -setup { http::cookiejar create ::cookiejar oo::objdefine ::cookiejar export Database -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { cookiejar storeCookie [dict replace { key foo value bar @@ -312,10 +328,10 @@ test http-cookiejar-4.11 {cookie storage: instance} -setup { } -cleanup { ::cookiejar destroy } -result 0 -test http-cookiejar-4.12 {cookie storage: instance} -setup { +test http-cookiejar-4.12 "cookie storage: instance" -setup { http::cookiejar create ::cookiejar oo::objdefine ::cookiejar export Database -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { cookiejar storeCookie [dict replace { key foo value bar @@ -330,10 +346,10 @@ test http-cookiejar-4.12 {cookie storage: instance} -setup { } -cleanup { ::cookiejar destroy } -result 1 -test http-cookiejar-4.13 {cookie storage: instance} -setup { +test http-cookiejar-4.13 "cookie storage: instance" -setup { http::cookiejar create ::cookiejar set result {} -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { lappend result [cookiejar getCookies http www.example.com /] cookiejar storeCookie { key foo @@ -348,10 +364,10 @@ test http-cookiejar-4.13 {cookie storage: instance} -setup { } -cleanup { ::cookiejar destroy } -result {{} {foo bar}} -test http-cookiejar-4.14 {cookie storage: instance} -setup { +test http-cookiejar-4.14 "cookie storage: instance" -setup { http::cookiejar create ::cookiejar set result {} -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { lappend result [cookiejar getCookies http www.example.com /] cookiejar storeCookie [dict replace { key foo @@ -366,10 +382,10 @@ test http-cookiejar-4.14 {cookie storage: instance} -setup { } -cleanup { ::cookiejar destroy } -result {{} {foo bar}} -test http-cookiejar-4.15 {cookie storage: instance} -setup { +test http-cookiejar-4.15 "cookie storage: instance" -setup { http::cookiejar create ::cookiejar set result {} -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { lappend result [cookiejar getCookies http www.example.com /] cookiejar storeCookie { key foo @@ -393,10 +409,10 @@ test http-cookiejar-4.15 {cookie storage: instance} -setup { } -cleanup { ::cookiejar destroy } -result {{} {foo bar}} -test http-cookiejar-4.16 {cookie storage: instance} -setup { +test http-cookiejar-4.16 "cookie storage: instance" -setup { http::cookiejar create ::cookiejar set result {} -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { lappend result [cookiejar getCookies http www.example.com /] cookiejar storeCookie { key foo1 @@ -420,17 +436,17 @@ test http-cookiejar-4.16 {cookie storage: instance} -setup { } -cleanup { ::cookiejar destroy } -result {{} {foo1 bar foo2 bar}} -test http-cookiejar-4.17 {cookie storage: instance} -setup { +test http-cookiejar-4.17 "cookie storage: instance" -setup { http::cookiejar create ::cookiejar -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { cookiejar lookup a b c d } -returnCodes error -cleanup { ::cookiejar destroy } -result {wrong # args: should be "cookiejar lookup ?host? ?key?"} -test http-cookiejar-4.18 {cookie storage: instance} -setup { +test http-cookiejar-4.18 "cookie storage: instance" -setup { http::cookiejar create ::cookiejar set result {} -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { lappend result [cookiejar lookup] lappend result [cookiejar lookup www.example.com] lappend result [catch {cookiejar lookup www.example.com foo} value] $value @@ -449,10 +465,10 @@ test http-cookiejar-4.18 {cookie storage: instance} -setup { } -cleanup { ::cookiejar destroy } -result {{} {} 1 {no such key for that host} www.example.com foo bar} -test http-cookiejar-4.19 {cookie storage: instance} -setup { +test http-cookiejar-4.19 "cookie storage: instance" -setup { http::cookiejar create ::cookiejar set result {} -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { cookiejar storeCookie { key foo value bar @@ -479,10 +495,10 @@ test http-cookiejar-4.19 {cookie storage: instance} -setup { } -cleanup { ::cookiejar destroy } -result {{www.example.com www.example.org} foo bar bar foo} -test http-cookiejar-4.20 {cookie storage: instance} -setup { +test http-cookiejar-4.20 "cookie storage: instance" -setup { http::cookiejar create ::cookiejar set result {} -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { cookiejar storeCookie { key foo1 value bar1 @@ -508,10 +524,10 @@ test http-cookiejar-4.20 {cookie storage: instance} -setup { } -cleanup { ::cookiejar destroy } -result {www.example.com {foo1 foo2} bar1 bar2} -test http-cookiejar-4.21 {cookie storage: instance} -setup { +test http-cookiejar-4.21 "cookie storage: instance" -setup { http::cookiejar create ::cookiejar set result {} -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { cookiejar storeCookie { key foo1 value bar1 @@ -537,25 +553,25 @@ test http-cookiejar-4.21 {cookie storage: instance} -setup { } -cleanup { ::cookiejar destroy } -result {www.example.com {foo1 foo2} bar1 bar2} -test http-cookiejar-4.22 {cookie storage: instance} -setup { +test http-cookiejar-4.22 "cookie storage: instance" -setup { http::cookiejar create ::cookiejar set result {} -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { cookiejar forceLoadDomainData x y z } -returnCodes error -cleanup { ::cookiejar destroy } -result {wrong # args: should be "cookiejar forceLoadDomainData"} -test http-cookiejar-4.23 {cookie storage: instance} -setup { +test http-cookiejar-4.23 "cookie storage: instance" -setup { http::cookiejar create ::cookiejar set result {} -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { cookiejar forceLoadDomainData } -cleanup { ::cookiejar destroy } -result {} test http-cookiejar-4.23.a {cookie storage: instance} -setup { set off [http::cookiejar configure -offline] -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { http::cookiejar configure -offline 1 [http::cookiejar create ::cookiejar] destroy } -cleanup { @@ -564,7 +580,7 @@ test http-cookiejar-4.23.a {cookie storage: instance} -setup { } -result {} test http-cookiejar-4.23.b {cookie storage: instance} -setup { set off [http::cookiejar configure -offline] -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { http::cookiejar configure -offline 0 [http::cookiejar create ::cookiejar] destroy } -cleanup { @@ -572,10 +588,10 @@ test http-cookiejar-4.23.b {cookie storage: instance} -setup { http::cookiejar configure -offline $off } -result {} -test http-cookiejar-5.1 {cookie storage: constraints} -setup { +test http-cookiejar-5.1 "cookie storage: constraints" -setup { http::cookiejar create ::cookiejar cookiejar forceLoadDomainData -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { cookiejar storeCookie { key foo value bar @@ -589,10 +605,10 @@ test http-cookiejar-5.1 {cookie storage: constraints} -setup { } -cleanup { ::cookiejar destroy } -result {} -test http-cookiejar-5.2 {cookie storage: constraints} -setup { +test http-cookiejar-5.2 "cookie storage: constraints" -setup { http::cookiejar create ::cookiejar cookiejar forceLoadDomainData -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { cookiejar storeCookie { key foo value bar @@ -606,10 +622,10 @@ test http-cookiejar-5.2 {cookie storage: constraints} -setup { } -cleanup { ::cookiejar destroy } -result {} -test http-cookiejar-5.3 {cookie storage: constraints} -setup { +test http-cookiejar-5.3 "cookie storage: constraints" -setup { http::cookiejar create ::cookiejar cookiejar forceLoadDomainData -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { cookiejar storeCookie { key foo1 value bar @@ -632,10 +648,10 @@ test http-cookiejar-5.3 {cookie storage: constraints} -setup { } -cleanup { ::cookiejar destroy } -result {example.com} -test http-cookiejar-5.4 {cookie storage: constraints} -setup { +test http-cookiejar-5.4 "cookie storage: constraints" -setup { http::cookiejar create ::cookiejar cookiejar forceLoadDomainData -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { cookiejar storeCookie { key foo value bar1 @@ -658,10 +674,10 @@ test http-cookiejar-5.4 {cookie storage: constraints} -setup { } -cleanup { ::cookiejar destroy } -result {example.com www.example.com} -test http-cookiejar-5.5 {cookie storage: constraints} -setup { +test http-cookiejar-5.5 "cookie storage: constraints" -setup { http::cookiejar create ::cookiejar cookiejar forceLoadDomainData -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { cookiejar storeCookie { key foo1 value 1 @@ -751,7 +767,7 @@ test http-cookiejar-5.5 {cookie storage: constraints} -setup { ::cookiejar destroy } -result {{foo3 3 foo6 6} {foo3 3} {foo3 3 foo6 6 foo8 8} {foo3 3 foo5 5}} -test http-cookiejar-6.1 {cookie storage: expiry and lookup} -setup { +test http-cookiejar-6.1 "cookie storage: expiry and lookup" -setup { http::cookiejar create ::cookiejar oo::objdefine cookiejar export PurgeCookies set result {} @@ -759,7 +775,7 @@ test http-cookiejar-6.1 {cookie storage: expiry and lookup} -setup { global result lappend result [lsort [lmap {k v} $cookies {set v}]] } -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { values [cookiejar getCookies http www.example.com /] cookiejar storeCookie { key foo @@ -811,11 +827,11 @@ test http-cookiejar-6.1 {cookie storage: expiry and lookup} -setup { ::cookiejar destroy } -result {{} session cookie {cookie session-global} {cookie session-global} session-global {}} -test http-cookiejar-7.1 {cookie storage: persistence of persistent cookies} -setup { +test http-cookiejar-7.1 "cookie storage: persistence of persistent cookies" -setup { catch {rename ::cookiejar ""} set f [makeFile "" cookiejar] file delete $f -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { http::cookiejar create ::cookiejar $f ::cookiejar destroy http::cookiejar create ::cookiejar $f @@ -823,12 +839,12 @@ test http-cookiejar-7.1 {cookie storage: persistence of persistent cookies} -set catch {rename ::cookiejar ""} removeFile $f } -result ::cookiejar -test http-cookiejar-7.2 {cookie storage: persistence of persistent cookies} -setup { +test http-cookiejar-7.2 "cookie storage: persistence of persistent cookies" -setup { catch {rename ::cookiejar ""} set f [makeFile "" cookiejar] file delete $f set result {} -} -constraints {sqlite3 cookiejar} -body { +} -constraints {notOSXtravis sqlite3 cookiejar} -body { http::cookiejar create ::cookiejar $f cookiejar storeCookie [dict replace { key foo |