diff options
author | hobbs <hobbs> | 2008-04-07 23:12:04 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2008-04-07 23:12:04 (GMT) |
commit | a5d980280f7e4fc0f4844db2e57effa8d4a44eeb (patch) | |
tree | 7f8187e38e1814d6419c84163a7cca4dd6c7d065 /tests/main.test | |
parent | 5a11c7eee8422bce5b09a6a655f4009721df76b6 (diff) | |
download | tk-a5d980280f7e4fc0f4844db2e57effa8d4a44eeb.zip tk-a5d980280f7e4fc0f4844db2e57effa8d4a44eeb.tar.gz tk-a5d980280f7e4fc0f4844db2e57effa8d4a44eeb.tar.bz2 |
* generic/tkWindow.c (Initialize): fix double-free on Tk_ParseArgv
* tests/main.test (main-3.*): error. [Bug 1937135]
Diffstat (limited to 'tests/main.test')
-rw-r--r-- | tests/main.test | 39 |
1 files changed, 25 insertions, 14 deletions
diff --git a/tests/main.test b/tests/main.test index 0f25637..fd65073 100644 --- a/tests/main.test +++ b/tests/main.test @@ -8,7 +8,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: main.test,v 1.6 2002/07/13 20:28:35 dgp Exp $ +# RCS: @(#) $Id: main.test,v 1.6.2.1 2008/04/07 23:12:10 hobbs Exp $ package require tcltest 2.1 namespace import -force tcltest::configure @@ -34,19 +34,30 @@ test main-1.1 {StdinProc} {unix} { list $error $msg } {0 {}} +test main-3.1 {Tk_ParseArgv: -help option} -constraints unix -body { + # Run only on unix as Win32 pops up native dialog + list [catch {exec [interpreter] -help} msg] $msg +} -match glob -result {1 {% Application initialization failed: Command-specific options:*}} + +test main-3.2 {Tk_ParseArgv: -help option} -setup { + set maininterp [interp create] +} -body { + $maininterp eval { set argc 1 ; set argv -help } + list [catch {load {} Tk $maininterp} msg] $msg +} -cleanup { + interp delete $maininterp +} -match glob -result {1 {Command-specific options:*}} + +test main-3.3 {Tk_ParseArgv: -help option} -setup { + set maininterp [interp create] +} -body { + # Repeat of 3.2 to catch cleanup, eg Bug 1927135 + $maininterp eval { set argc 1 ; set argv -help } + list [catch {load {} Tk $maininterp} msg] $msg +} -cleanup { + interp delete $maininterp +} -match glob -result {1 {Command-specific options:*}} + # cleanup ::tcltest::cleanupTests return - - - - - - - - - - - - - |