summaryrefslogtreecommitdiffstats
path: root/tests/main.test
diff options
context:
space:
mode:
authorhobbs <hobbs@noemail.net>2008-04-07 23:14:07 (GMT)
committerhobbs <hobbs@noemail.net>2008-04-07 23:14:07 (GMT)
commit6436e068f6d92b0a16399db2d7c461a46db54701 (patch)
tree5298d039bc3566059b995197193fa2754f150ea9 /tests/main.test
parent7ba21f0afe12f08e4db389144bf33be73ce116da (diff)
downloadtk-6436e068f6d92b0a16399db2d7c461a46db54701.zip
tk-6436e068f6d92b0a16399db2d7c461a46db54701.tar.gz
tk-6436e068f6d92b0a16399db2d7c461a46db54701.tar.bz2
* generic/tkWindow.c (Initialize): fix double-free on Tk_ParseArgv
* tests/main.test (main-3.*): error. [Bug 1937135] FossilOrigin-Name: 2f618a4fff8de8aeb0e229a004e885b6f1454570
Diffstat (limited to 'tests/main.test')
-rw-r--r--tests/main.test26
1 files changed, 25 insertions, 1 deletions
diff --git a/tests/main.test b/tests/main.test
index d37240f..9a02438 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.10 2004/12/08 03:03:06 dgp Exp $
+# RCS: @(#) $Id: main.test,v 1.10.4.1 2008/04/07 23:14:07 hobbs Exp $
package require tcltest 2.1
eval tcltest::configure $argv
@@ -99,6 +99,30 @@ test main-2.3 {Tk_MainEx: -encoding option} -constraints {
removeFile script
} -result {0 {-enc utf-8 script}}
+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
cleanupTests
return