head	1.11;
access;
symbols
	core-8-5-9:1.10
	core-8-5-8:1.10
	macosx-cocoa-merge:1.11
	macosx-cocoa-premerge:1.11
	macosx-carbon-freeze:1.11
	core-8-5-7:1.10
	core-8-5-6:1.10
	core-8-6-b1:1.11
	core-8-6-a3:1.11
	core-8-5-5:1.10
	core-8-6-a2:1.10
	core-8-5-4:1.10
	core-8-5-3:1.10
	core-8-6-a1:1.10
	core-8-4-19:1.7
	core-8-5-branch:1.10.0.4
	core-8-5-2:1.10
	core-8-4-18:1.7
	core-8-5-1:1.10
	core-8-4-17:1.7
	core-8-5-0:1.10
	core-8-5-b3:1.10
	core-8-5-b2:1.10
	core-8-4-16:1.7
	core-8-5-b1:1.10
	core-stablilizer-merge:1.10
	core-stabilizer-branch:1.10.0.2
	core-stabilizer-merge:1.10
	core-8-4-15:1.7
	core-8-5-a6:1.10
	core-8-5-a5:1.10
	core-8-4-14:1.7
	core-8-5-a4:1.10
	core-8-4-13:1.7
	core-8-4-12:1.7
	core-8-4-11:1.7
	core-8-5-a3:1.10
	core-8-4-10:1.7
	core-8-4-9-branch:1.7.0.4
	core-8-5-a2:1.10
	core-8-4-9:1.7
	core-8-4-8:1.7
	core-8-4-7:1.7
	core-8-5-a1:1.8
	core-8-4-6:1.7
	core-8-4-5:1.7
	mistachkin-dev-branch:1.8.0.2
	core-8-4-4:1.7
	core-8-4-3:1.7
	core-8-4-branch:1.7.0.2
	core-8-4-2:1.7
	core-8-4-1:1.7
	core-8-3-5:1.4
	core-8-4-0:1.7
	macosx-8-4-merge-2002-08-31-trunk:1.7
	macosx-8-4-premerge-2002-08-31-branch:1.5.2.1
	macosx-8-4-premerge-2002-08-31-trunk:1.7
	macosx-8-4-merge-2002-08-30-branch:1.5.2.1
	macosx-8-4-merge-2002-08-30-trunk:1.7
	macosx-8-4-merge-2002-08-20-branch:1.5.2.1
	macosx-8-4-merge-2002-08-20-trunk:1.7
	core-8-4-b2:1.7
	core-8-4-b1:1.5
	macosx-premerge-6-9-02:1.5
	core-8-4-a4:1.5
	core-8-3-4:1.4
	macosx-8-4-branch:1.5.0.2
	macosx-8-4-branchpoint:1.5
	core-8-4-a3:1.5
	core-8-3-3:1.4
	dgp-privates-into-namespace:1.4.0.6
	tclpro-1-5-0:1.4
	core-8-4-win-speedup:1.4.0.4
	core-8-4-a2:1.4
	tclpro-1-4-1:1.4
	tclpro-1-4-0:1.4
	core-8-3-2:1.4
	ajuba-ajuba2-2-1-base:1.4
	ajuba-ajuba2-2-0:1.4
	core-8-4-a1:1.4
	core-8-3-1-branch:1.4.0.2
	core-8-3-1:1.4
	scriptics-sc-2-0-b5:1.4
	scriptics-sc-2-0-fixed:1.4
	scriptics-sc-2-0-b2:1.3
	scriptics-sc-2-0-b1:1.3
	core-8-3-0:1.3
	core-8-3-b2:1.3
	core-8-3-b1:1.3
	scriptics-sc-1-1:1.2
	scriptics-sc-1-1-b1:1.2
	core-8-2-3:1.2
	scriptics-sc-1-1-branch:1.2.0.10
	scriptics-sc-1-1-base:1.2
	scriptics-sc-1-0:1.2
	scriptics-sc-1-0-branch:1.2.0.8
	scriptics-sc-1-0-base:1.2
	core-8-2-2:1.2
	core-8-2-1:1.2
	scriptics-bc-1-0-b1:1.2
	core-8-2-1-branch:1.2.0.6
	scriptics-tclpro-1-3-0:1.2
	core-8-2-0:1.2
	core-8-2-b3-branch:1.2.0.4
	core-8-2-b3-base:1.2
	scriptics-tclpro-1-3-b4:1.2
	core-8-2-b2:1.2
	scriptics-tclpro-1-3-b3:1.2
	core-8-2-b1:1.2
	scriptics-tclpro-1-3-b2:1.2
	merge-to-mainline-5/21/99:1.2
	scriptics-tclpro-1-3-b2-branch:1.2.0.2
	core-8-1-1:1.2
	scriptics-tclpro-1-3-b1:1.2
	core-8-1-1-base:1.2
	core-8-1-0:1.2
	merge-to-mainline-4-29-99:1.2
	merge-to-mainline-4-23-99:1.2
	core-8-1-branch-old:1.1.0.2
	core-8-1-b3:1.1.2.5
	core-8-1-b2:1.1.2.3
	dev-8-1-stubs-branch:1.1.2.2.0.2
	core-8-1-b1:1.1.2.2
	core-8-1-a2:1.1.2.1;
locks; strict;
comment	@# @;


1.11
date	2008.08.30.21.52.26;	author aniap;	state Exp;
branches;
next	1.10;

1.10
date	2004.06.24.12.45.45;	author dkf;	state Exp;
branches;
next	1.9;

1.9
date	2004.05.23.17.34.50;	author dkf;	state Exp;
branches;
next	1.8;

1.8
date	2003.04.01.21.07.05;	author dgp;	state Exp;
branches;
next	1.7;

1.7
date	2002.07.13.20.28.36;	author dgp;	state Exp;
branches;
next	1.6;

1.6
date	2002.07.12.13.41.01;	author dgp;	state Exp;
branches;
next	1.5;

1.5
date	2001.08.01.16.21.12;	author dgp;	state Exp;
branches
	1.5.2.1;
next	1.4;

1.4
date	2000.03.24.23.13.19;	author ericm;	state Exp;
branches
	1.4.4.1
	1.4.6.1;
next	1.3;

1.3
date	99.11.12.23.55.16;	author wart;	state Exp;
branches;
next	1.2;

1.2
date	99.04.16.01.51.44;	author stanton;	state Exp;
branches;
next	1.1;

1.1
date	98.09.29.00.25.58;	author stanton;	state dead;
branches
	1.1.2.1;
next	;

1.1.2.1
date	98.09.29.00.25.58;	author stanton;	state Exp;
branches;
next	1.1.2.2;

1.1.2.2
date	98.09.30.02.19.09;	author stanton;	state Exp;
branches;
next	1.1.2.3;

1.1.2.3
date	99.03.11.18.51.25;	author hershey;	state Exp;
branches;
next	1.1.2.4;

1.1.2.4
date	99.03.24.01.17.22;	author hershey;	state Exp;
branches;
next	1.1.2.5;

1.1.2.5
date	99.03.24.02.55.16;	author hershey;	state Exp;
branches;
next	;

1.4.4.1
date	2002.04.02.20.57.59;	author hobbs;	state Exp;
branches;
next	;

1.4.6.1
date	2001.02.28.23.29.56;	author dgp;	state Exp;
branches;
next	;

1.5.2.1
date	2002.08.20.20.27.16;	author das;	state Exp;
branches;
next	;


desc
@@


1.11
log
@Update to tcltest2
@
text
@# xmfbox.test --
#
#	This file is a Tcl script to test the file dialog that's used
#	when the tk_strictMotif flag is set. Because the file dialog
#	runs in a modal loop, the only way to test it sufficiently is
#	to call the internal Tcl procedures in xmfbox.tcl directly.
#
# Copyright (c) 1997 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# Contributions from Don Porter, NIST, 2002.  (not subject to US copyright)
# All rights reserved.
#
# RCS: @@(#) $Id: xmfbox.test,v 1.10 2004/06/24 12:45:45 dkf Exp $

package require tcltest 2.2
namespace import ::tcltest::*
tcltest::configure {*}$argv
tcltest::loadTestedCommands

set testPWD [pwd]
catch {unset data foo}

proc cleanup {} {
    global testPWD

    set err0 [catch {
	    cd $testPWD
    } msg0]

    set err1 [catch {
	    if [file exists ./~nosuchuser1] {
	        file delete ./~nosuchuser1
	    }
    } msg1]

    set err2 [catch {
	    if [file exists ./~nosuchuser2] {
	        file delete ./~nosuchuser2
	    }
    } msg2]

    set err3 [catch {
	    if [file exists ./~nosuchuser3] {
	        file delete ./~nosuchuser3
	    }
    } msg3]

    set err4 [catch {
	    if [file exists ./~nosuchuser4] {
	        file delete ./~nosuchuser4
	    }
    } msg4]

    if {$err0 || $err1 || $err2 || $err3 || $err4} {
	    error [list $msg0 $msg1 $msg2 $msg3 $msg4]
    }
    catch {unset foo}
    destroy .foo
}

# ----------------------------------------------------------------------

test xmfbox-1.1 {tk::MotifFDialog_Create, -parent switch} -constraints {
    unix
} -setup {
    catch {unset foo}
} -body {
    set x [tk::MotifFDialog_Create foo open {-parent .}]
} -cleanup {
    destroy $x
} -result {.foo}

test xmfbox-1.2 {tk::MotifFDialog_Create, -parent switch} -constraints {
    unix
} -setup {
    catch {unset foo}
    deleteWindows
} -body {
    toplevel .bar
    wm geometry .bar +0+0
    set x [tk::MotifFDialog_Create foo open {-parent .bar}]
} -cleanup {
    destroy $x
    destroy .bar
}  -result {.bar.foo}


test xmfbox-2.1 {tk::MotifFDialog_InterpFilter, ~ in dir names} -constraints {
    unix
} -body {
    cleanup
    file mkdir ./~nosuchuser1
    set x [tk::MotifFDialog_Create foo open {}]
    $::tk::dialog::file::foo(fEnt) delete 0 end
    $::tk::dialog::file::foo(fEnt) insert 0 [pwd]/~nosuchuser1
    set kk [tk::MotifFDialog_InterpFilter $x]
} -result "$testPWD/~nosuchuser1 *"

test xmfbox-2.2 {tk::MotifFDialog_InterpFilter, ~ in file names} -constraints {
    unix
} -body {
    cleanup
    close [open ./~nosuchuser1 {CREAT TRUNC WRONLY}]
    set x [tk::MotifFDialog_Create foo open {}]
    $::tk::dialog::file::foo(fEnt) delete 0 end
    $::tk::dialog::file::foo(fEnt) insert 0 [pwd]/~nosuchuser1
    set kk [tk::MotifFDialog_InterpFilter $x]
} -result "$testPWD ./~nosuchuser1"

test xmfbox-2.3 {tk::MotifFDialog_Update, ~ in file names} -constraints {
    unix
} -body {
    cleanup
    close [open ./~nosuchuser1 {CREAT TRUNC WRONLY}]
    set x [tk::MotifFDialog_Create foo open {}]
    $::tk::dialog::file::foo(fEnt) delete 0 end
    $::tk::dialog::file::foo(fEnt) insert 0 [pwd]/~nosuchuser1
    tk::MotifFDialog_InterpFilter $x
    tk::MotifFDialog_Update $x
    $::tk::dialog::file::foo(fList) get end
} -result {~nosuchuser1}

test xmfbox-2.4 {tk::MotifFDialog_LoadFile, ~ in file names} -constraints {
    unix
} -body {
    cleanup
    close [open ./~nosuchuser1 {CREAT TRUNC WRONLY}]
    set x [tk::MotifFDialog_Create foo open {}]
    set i [lsearch [$::tk::dialog::file::foo(fList) get 0 end] ~nosuchuser1]
    expr {$i >= 0}
} -result 1

test xmfbox-2.5 {tk::MotifFDialog_BrowseFList, ~ in file names} -constraints {
    unix
} -body {
    cleanup
    close [open ./~nosuchuser1 {CREAT TRUNC WRONLY}]
    set x [tk::MotifFDialog_Create foo open {}]
    set i [lsearch [$::tk::dialog::file::foo(fList) get 0 end] ~nosuchuser1]
    $::tk::dialog::file::foo(fList) selection clear 0 end
    $::tk::dialog::file::foo(fList) selection set $i
    tk::MotifFDialog_BrowseFList $x
    $::tk::dialog::file::foo(sEnt) get
} -result "$testPWD/~nosuchuser1"

test xmfbox-2.6 {tk::MotifFDialog_ActivateFList, ~ in file names} -constraints {
    unix
} -body {
    cleanup
    close [open ./~nosuchuser1 {CREAT TRUNC WRONLY}]
    set x [tk::MotifFDialog_Create foo open {}]
    set i [lsearch [$::tk::dialog::file::foo(fList) get 0 end] ~nosuchuser1]
    $::tk::dialog::file::foo(fList) selection clear 0 end
    $::tk::dialog::file::foo(fList) selection set $i
    tk::MotifFDialog_BrowseFList $x
    tk::MotifFDialog_ActivateFList $x
    list $::tk::dialog::file::foo(selectPath) \
	    $::tk::dialog::file::foo(selectFile) $tk::Priv(selectFilePath)
} -result "$testPWD ~nosuchuser1 $testPWD/~nosuchuser1"

# cleanup
cleanup
cleanupTests
return

# Local variables:
# mode: tcl
# End:@


1.10
log
@Use standard constraint names
@
text
@d1 1
a1 1
# xmfbox.test -- 
d13 1
a13 1
# RCS: @@(#) $Id: xmfbox.test,v 1.9 2004/05/23 17:34:50 dkf Exp $
d15 3
a17 2
package require tcltest 2.1
eval tcltest::configure $argv
a20 2
catch {unset foo}

d27 1
a27 1
	cd $testPWD
d31 3
a33 3
	if [file exists ./~nosuchuser1] {
	    file delete ./~nosuchuser1
	}
d37 3
a39 3
	if [file exists ./~nosuchuser2] {
	    file delete ./~nosuchuser2
	}
d43 3
a45 3
	if [file exists ./~nosuchuser3] {
	    file delete ./~nosuchuser3
	}
d49 3
a51 3
	if [file exists ./~nosuchuser4] {
	    file delete ./~nosuchuser4
	}
d55 1
a55 1
	error [list $msg0 $msg1 $msg2 $msg3 $msg4] 
d58 1
a58 1
    catch {destroy .foo}
d61 5
a65 1
test xmfbox-1.1 {tk::MotifFDialog_Create, -parent switch} unix {
d67 1
d69 7
a75 5
    catch {destroy $x}
    set x
} .foo

test xmfbox-1.2 {tk::MotifFDialog_Create, -parent switch} unix {
d77 2
d82 4
a85 4
    catch {destroy $x}
    catch {destroy .bar}
    set x
} .bar.foo
d87 4
a90 1
test xmfbox-2.1 {tk::MotifFDialog_InterpFilter, ~ in dir names} unix {
d97 1
a97 1
} [list $testPWD/~nosuchuser1 *]
d99 3
a101 1
test xmfbox-2.2 {tk::MotifFDialog_InterpFilter, ~ in file names} unix {
d108 1
a108 1
} [list $testPWD ./~nosuchuser1]
d110 3
a112 1
test xmfbox-2.3 {tk::MotifFDialog_Update, ~ in file names} unix {
d121 1
a121 1
} ~nosuchuser1
d123 3
a125 1
test xmfbox-2.4 {tk::MotifFDialog_LoadFile, ~ in file names} unix {
d131 1
a131 1
} 1
d133 3
a135 1
test xmfbox-2.5 {tk::MotifFDialog_BrowseFList, ~ in file names} unix {
d144 1
a144 1
} $testPWD/~nosuchuser1
d146 3
a148 1
test xmfbox-2.6 {tk::MotifFDialog_ActivateFList, ~ in file names} unix {
d159 1
a159 1
} [list $testPWD ~nosuchuser1 $testPWD/~nosuchuser1]
d165 4
@


1.9
log
@First step towards improving test style.  Also start using Tcl 8.5 features.
@
text
@d13 1
a13 1
# RCS: @@(#) $Id: xmfbox.test,v 1.8 2003/04/01 21:07:05 dgp Exp $
d62 1
a62 1
test xmfbox-1.1 {tk::MotifFDialog_Create, -parent switch} {unixOnly} {
d69 1
a69 1
test xmfbox-1.2 {tk::MotifFDialog_Create, -parent switch} {unixOnly} {
d79 1
a79 1
test xmfbox-2.1 {tk::MotifFDialog_InterpFilter, ~ in dir names} {unixOnly} {
d88 1
a88 1
test xmfbox-2.2 {tk::MotifFDialog_InterpFilter, ~ in file names} {unixOnly} {
d97 1
a97 1
test xmfbox-2.3 {tk::MotifFDialog_Update, ~ in file names} {unixOnly} {
d108 1
a108 1
test xmfbox-2.4 {tk::MotifFDialog_LoadFile, ~ in file names} {unixOnly} {
d116 1
a116 1
test xmfbox-2.5 {tk::MotifFDialog_BrowseFList, ~ in file names} {unixOnly} {
d127 1
a127 1
test xmfbox-2.6 {tk::MotifFDialog_ActivateFList, ~ in file names} {unixOnly} {
@


1.8
log
@        * tests/all.tcl:                Made better use of a common
        * tests/constraints.tcl:        -loadfile to hold definitions
        * tests/*.test:                 common to all test files.
@
text
@d13 1
a13 1
# RCS: @@(#) $Id: xmfbox.test,v 1.7 2002/07/13 20:28:36 dgp Exp $
a143 12












@


1.7
log
@	* Converted more files to tcltest and factored out common code.
@
text
@d13 1
a13 1
# RCS: @@(#) $Id: xmfbox.test,v 1.6 2002/07/12 13:41:01 dgp Exp $
d16 1
a16 4
namespace import -force tcltest::configure
namespace import -force tcltest::testsDirectory
configure -testdir [file join [pwd] [file dirname [info script]]]
configure -loadfile [file join [testsDirectory] constraints.tcl]
d142 1
a142 1
::tcltest::cleanupTests
@


1.6
log
@	* Converted several files in the Tk test suite for testing by
	tcltest 2.1.
@
text
@d13 1
a13 1
# RCS: @@(#) $Id: xmfbox.test,v 1.5 2001/08/01 16:21:12 dgp Exp $
d16 5
a20 1
namespace import -force tcltest::test
a22 1
eval destroy [winfo children .]
@


1.5
log
@	Merged changes from feature branch dgp-privates-into-namespace,
	implementing TIP 44.  All Tk commands and variables matching
	tk[A-Z]* are now in the ::tk namespace.
@
text
@d10 1
d13 1
a13 1
# RCS: @@(#) $Id: xmfbox.test,v 1.4 2000/03/24 23:13:19 ericm Exp $
d15 2
a16 3
if {[lsearch [namespace children] ::tcltest] == -1} {
    source [file join [pwd] [file dirname [info script]] defs.tcl]
}
d127 1
a127 1
test xmfbox-2.5 {tk::MotifFDialog_ActivateFList, ~ in file names} {unixOnly} {
@


1.5.2.1
log
@merged with trunk at tag macosx-8-4-merge-2002-08-20-trunk
@
text
@a9 1
# Contributions from Don Porter, NIST, 2002.  (not subject to US copyright)
d12 1
a12 1
# RCS: @@(#) $Id$
d14 3
a16 6
package require tcltest 2.1
namespace import -force tcltest::configure
namespace import -force tcltest::testsDirectory
configure -testdir [file join [pwd] [file dirname [info script]]]
configure -loadfile [file join [testsDirectory] constraints.tcl]
tcltest::loadTestedCommands
d19 1
d127 1
a127 1
test xmfbox-2.6 {tk::MotifFDialog_ActivateFList, ~ in file names} {unixOnly} {
@


1.4
log
@* tests/xmfbox.test: Updated tests.

* generic/tkWindow.c:
* generic/tkInt.h: Updated Tcl_OptionCmd -> Tcl_OptionObjCmd

* generic/tkOption.c: Tcl_Obj'ectified the "option" command.
@
text
@d12 1
a12 1
# RCS: @@(#) $Id: xmfbox.test,v 1.3 1999/11/12 23:55:16 wart Exp $
d62 1
a62 1
test xmfbox-1.1 {tkMotifFDialog_Create, -parent switch} {unixOnly} {
d64 1
a64 1
    set x [tkMotifFDialog_Create foo open {-parent .}]
d69 1
a69 1
test xmfbox-1.2 {tkMotifFDialog_Create, -parent switch} {unixOnly} {
d73 1
a73 1
    set x [tkMotifFDialog_Create foo open {-parent .bar}]
d79 1
a79 1
test xmfbox-2.1 {tkMotifFDialog_InterpFilter, ~ in dir names} {unixOnly} {
d82 1
a82 1
    set x [tkMotifFDialog_Create foo open {}]
d85 1
a85 1
    set kk [tkMotifFDialog_InterpFilter $x]
d88 1
a88 1
test xmfbox-2.2 {tkMotifFDialog_InterpFilter, ~ in file names} {unixOnly} {
d91 1
a91 1
    set x [tkMotifFDialog_Create foo open {}]
d94 1
a94 1
    set kk [tkMotifFDialog_InterpFilter $x]
d97 1
a97 1
test xmfbox-2.3 {tkMotifFDialog_Update, ~ in file names} {unixOnly} {
d100 1
a100 1
    set x [tkMotifFDialog_Create foo open {}]
d103 2
a104 2
    tkMotifFDialog_InterpFilter $x
    tkMotifFDialog_Update $x
d108 1
a108 1
test xmfbox-2.4 {tkMotifFDialog_LoadFile, ~ in file names} {unixOnly} {
d111 1
a111 1
    set x [tkMotifFDialog_Create foo open {}]
d116 1
a116 1
test xmfbox-2.5 {tkMotifFDialog_BrowseFList, ~ in file names} {unixOnly} {
d119 1
a119 1
    set x [tkMotifFDialog_Create foo open {}]
d123 1
a123 1
    tkMotifFDialog_BrowseFList $x
d127 1
a127 1
test xmfbox-2.5 {tkMotifFDialog_ActivateFList, ~ in file names} {unixOnly} {
d130 1
a130 1
    set x [tkMotifFDialog_Create foo open {}]
d134 2
a135 2
    tkMotifFDialog_BrowseFList $x
    tkMotifFDialog_ActivateFList $x
d137 1
a137 1
	    $::tk::dialog::file::foo(selectFile) $tkPriv(selectFilePath)
@


1.4.4.1
log
@sync with head
@
text
@d12 1
a12 1
# RCS: @@(#) $Id: xmfbox.test,v 1.5 2001/08/01 16:21:12 dgp Exp $
d62 1
a62 1
test xmfbox-1.1 {tk::MotifFDialog_Create, -parent switch} {unixOnly} {
d64 1
a64 1
    set x [tk::MotifFDialog_Create foo open {-parent .}]
d69 1
a69 1
test xmfbox-1.2 {tk::MotifFDialog_Create, -parent switch} {unixOnly} {
d73 1
a73 1
    set x [tk::MotifFDialog_Create foo open {-parent .bar}]
d79 1
a79 1
test xmfbox-2.1 {tk::MotifFDialog_InterpFilter, ~ in dir names} {unixOnly} {
d82 1
a82 1
    set x [tk::MotifFDialog_Create foo open {}]
d85 1
a85 1
    set kk [tk::MotifFDialog_InterpFilter $x]
d88 1
a88 1
test xmfbox-2.2 {tk::MotifFDialog_InterpFilter, ~ in file names} {unixOnly} {
d91 1
a91 1
    set x [tk::MotifFDialog_Create foo open {}]
d94 1
a94 1
    set kk [tk::MotifFDialog_InterpFilter $x]
d97 1
a97 1
test xmfbox-2.3 {tk::MotifFDialog_Update, ~ in file names} {unixOnly} {
d100 1
a100 1
    set x [tk::MotifFDialog_Create foo open {}]
d103 2
a104 2
    tk::MotifFDialog_InterpFilter $x
    tk::MotifFDialog_Update $x
d108 1
a108 1
test xmfbox-2.4 {tk::MotifFDialog_LoadFile, ~ in file names} {unixOnly} {
d111 1
a111 1
    set x [tk::MotifFDialog_Create foo open {}]
d116 1
a116 1
test xmfbox-2.5 {tk::MotifFDialog_BrowseFList, ~ in file names} {unixOnly} {
d119 1
a119 1
    set x [tk::MotifFDialog_Create foo open {}]
d123 1
a123 1
    tk::MotifFDialog_BrowseFList $x
d127 1
a127 1
test xmfbox-2.5 {tk::MotifFDialog_ActivateFList, ~ in file names} {unixOnly} {
d130 1
a130 1
    set x [tk::MotifFDialog_Create foo open {}]
d134 2
a135 2
    tk::MotifFDialog_BrowseFList $x
    tk::MotifFDialog_ActivateFList $x
d137 1
a137 1
	    $::tk::dialog::file::foo(selectFile) $tk::Priv(selectFilePath)
@


1.4.6.1
log
@2001-02-28  Don Porter  <dgp@@users.sourceforge.net>

        BRANCH dgp-privates-into-namespace:  Feature branch to move all
        of Tk's private commands and variable into the ::tk namespace
        and its children.

        * doc/tkvars.n:  Documented private variable tkPriv renamed tk::Priv.

        * generic/tkBind.c:
        * generic/tkMenu.c:
        * generic/tkTextDisp.c:
        * library/bgerror.tcl:
        * library/button.tcl:
        * library/choosedir.tcl:
        * library/clrpick.tcl:
        * library/comdlg.tcl:
        * library/console.tcl:
        * library/dialog.tcl:
        * library/entry.tcl:
        * library/focus.tcl:
        * library/listbox.tcl:
        * library/menu.tcl:
        * library/msgbox.tcl:
        * library/optMenu.tcl:
        * library/palette.tcl:
        * library/scale.tcl:
        * library/scrlbar.tcl:
        * library/spinbox.tcl:
        * library/tclIndex:
        * library/tearoff.tcl:
        * library/text.tcl:
        * library/tk.tcl:
        * library/tkfbox.tcl:
        * library/xmfbox.tcl:
        * mac/tkMacMenu.c:
        * tests/clrpick.test:
        * tests/filebox.test:
        * tests/macMenu.test:
        * tests/menu.test:
        * tests/menuDraw.test:
        * tests/msgbox.test:
        * tests/text.test:
        * tests/textDisp.test:
        * tests/unixMenu.test:
        * tests/winMenu.test:
        * tests/xmfbox.test:
        * unix/tkUnixDialog.c:  All Tk commands matching ::tk[A-Z]* and
        all Tk private variables in the global namespace were renamed to
        live in the namespace ::tk or one of its children.
@
text
@d12 1
a12 1
# RCS: @@(#) $Id: xmfbox.test,v 1.4 2000/03/24 23:13:19 ericm Exp $
d62 1
a62 1
test xmfbox-1.1 {tk::MotifFDialog_Create, -parent switch} {unixOnly} {
d64 1
a64 1
    set x [tk::MotifFDialog_Create foo open {-parent .}]
d69 1
a69 1
test xmfbox-1.2 {tk::MotifFDialog_Create, -parent switch} {unixOnly} {
d73 1
a73 1
    set x [tk::MotifFDialog_Create foo open {-parent .bar}]
d79 1
a79 1
test xmfbox-2.1 {tk::MotifFDialog_InterpFilter, ~ in dir names} {unixOnly} {
d82 1
a82 1
    set x [tk::MotifFDialog_Create foo open {}]
d85 1
a85 1
    set kk [tk::MotifFDialog_InterpFilter $x]
d88 1
a88 1
test xmfbox-2.2 {tk::MotifFDialog_InterpFilter, ~ in file names} {unixOnly} {
d91 1
a91 1
    set x [tk::MotifFDialog_Create foo open {}]
d94 1
a94 1
    set kk [tk::MotifFDialog_InterpFilter $x]
d97 1
a97 1
test xmfbox-2.3 {tk::MotifFDialog_Update, ~ in file names} {unixOnly} {
d100 1
a100 1
    set x [tk::MotifFDialog_Create foo open {}]
d103 2
a104 2
    tk::MotifFDialog_InterpFilter $x
    tk::MotifFDialog_Update $x
d108 1
a108 1
test xmfbox-2.4 {tk::MotifFDialog_LoadFile, ~ in file names} {unixOnly} {
d111 1
a111 1
    set x [tk::MotifFDialog_Create foo open {}]
d116 1
a116 1
test xmfbox-2.5 {tk::MotifFDialog_BrowseFList, ~ in file names} {unixOnly} {
d119 1
a119 1
    set x [tk::MotifFDialog_Create foo open {}]
d123 1
a123 1
    tk::MotifFDialog_BrowseFList $x
d127 1
a127 1
test xmfbox-2.5 {tk::MotifFDialog_ActivateFList, ~ in file names} {unixOnly} {
d130 1
a130 1
    set x [tk::MotifFDialog_Create foo open {}]
d134 2
a135 2
    tk::MotifFDialog_BrowseFList $x
    tk::MotifFDialog_ActivateFList $x
d137 1
a137 1
	    $::tk::dialog::file::foo(selectFile) $tk::Priv(selectFilePath)
@


1.3
log
@Added "wm geometry" calls in some tests that were waiting for the user to
place a window manually.  The Tk test suite can now run on twm with no user
intervention.
@
text
@d12 1
a12 1
# RCS: @@(#) $Id: xmfbox.test,v 1.2 1999/04/16 01:51:44 stanton Exp $
d83 2
a84 2
    $foo(fEnt) delete 0 end
    $foo(fEnt) insert 0 [pwd]/~nosuchuser1
d92 2
a93 2
    $foo(fEnt) delete 0 end
    $foo(fEnt) insert 0 [pwd]/~nosuchuser1
d101 2
a102 2
    $foo(fEnt) delete 0 end
    $foo(fEnt) insert 0 [pwd]/~nosuchuser1
d105 1
a105 1
    $foo(fList) get end
d112 1
a112 1
    set i [lsearch [$foo(fList) get 0 end] ~nosuchuser1]
d120 3
a122 3
    set i [lsearch [$foo(fList) get 0 end] ~nosuchuser1]
    $foo(fList) selection clear 0 end
    $foo(fList) selection set $i
d124 1
a124 1
    $foo(sEnt) get
d131 3
a133 3
    set i [lsearch [$foo(fList) get 0 end] ~nosuchuser1]
    $foo(fList) selection clear 0 end
    $foo(fList) selection set $i
d136 2
a137 1
    list $foo(selectPath) $foo(selectFile) $tkPriv(selectFilePath)
@


1.2
log
@* Merged 8.1 branch into the main trunk
@
text
@d12 1
a12 1
# RCS: @@(#) $Id: xmfbox.test,v 1.1.2.5 1999/03/24 02:55:16 hershey Exp $
d72 1
@


1.1
log
@file xmfbox.test was initially added on branch core-8-1-branch.
@
text
@d1 153
@


1.1.2.1
log
@initial tk8.1a2 version
@
text
@a0 146
# xmfbox.test -- 
#
#	This file is a Tcl script to test the file dialog that's used
#	when the tk_strictMotif flag is set. Because the file dialog
#	runs in a modal loop, the only way to test it sufficiently is
#	to call the internal Tcl procedures in xmfbox.tcl directly.
#
# Copyright (c) 1997 Sun Microsystems, Inc.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# SCCS: @@(#) xmfbox.test 1.3 98/01/07 16:44:17

if {[string compare test [info procs test]] == 1} {
    source defs
}

if {$tcl_platform(platform) != "unix"} {
    # This test is needed only on Unix platforms. Windows and Mac
    # have their own Native file dialogs.
    return
}

set testPWD [pwd]
eval destroy [winfo children .]
catch {unset foo}

catch {unset data foo}

proc cleanup {} {
    global testPWD

    set err0 [catch {
	cd $testPWD
    } msg0]

    set err1 [catch {
	if [file exists ./~nosuchuser1] {
	    file delete ./~nosuchuser1
	}
    } msg1]

    set err2 [catch {
	if [file exists ./~nosuchuser2] {
	    file delete ./~nosuchuser2
	}
    } msg2]

    set err3 [catch {
	if [file exists ./~nosuchuser3] {
	    file delete ./~nosuchuser3
	}
    } msg3]

    set err4 [catch {
	if [file exists ./~nosuchuser4] {
	    file delete ./~nosuchuser4
	}
    } msg4]

    if {$err0 || $err1 || $err2 || $err3 || $err4} {
	error [list $msg0 $msg1 $msg2 $msg3 $msg4] 
    }
    catch {unset foo}
    catch {destroy .foo}
}

test xmfbox-1.1 {tkMotifFDialog_Create, -parent switch} {
    catch {unset foo}
    set x [tkMotifFDialog_Create foo open {-parent .}]
    catch {destroy $x}
    set x
} .foo

test xmfbox-1.2 {tkMotifFDialog_Create, -parent switch} {
    catch {unset foo}
    toplevel .bar
    set x [tkMotifFDialog_Create foo open {-parent .bar}]
    catch {destroy $x}
    catch {destroy .bar}
    set x
} .bar.foo

test xmfbox-2.1 {tkMotifFDialog_InterpFilter, ~ in dir names} {
    cleanup
    file mkdir ./~nosuchuser1
    set x [tkMotifFDialog_Create foo open {}]
    $foo(fEnt) delete 0 end
    $foo(fEnt) insert 0 [pwd]/~nosuchuser1
    set kk [tkMotifFDialog_InterpFilter $x]
} [list $testPWD/~nosuchuser1 *]

test xmfbox-2.2 {tkMotifFDialog_InterpFilter, ~ in file names} {
    cleanup
    close [open ./~nosuchuser1 {CREAT TRUNC WRONLY}]
    set x [tkMotifFDialog_Create foo open {}]
    $foo(fEnt) delete 0 end
    $foo(fEnt) insert 0 [pwd]/~nosuchuser1
    set kk [tkMotifFDialog_InterpFilter $x]
} [list $testPWD ./~nosuchuser1]

test xmfbox-2.3 {tkMotifFDialog_Update, ~ in file names} {
    cleanup
    close [open ./~nosuchuser1 {CREAT TRUNC WRONLY}]
    set x [tkMotifFDialog_Create foo open {}]
    $foo(fEnt) delete 0 end
    $foo(fEnt) insert 0 [pwd]/~nosuchuser1
    tkMotifFDialog_InterpFilter $x
    tkMotifFDialog_Update $x
    $foo(fList) get end
} ~nosuchuser1

test xmfbox-2.4 {tkMotifFDialog_LoadFile, ~ in file names} {
    cleanup
    close [open ./~nosuchuser1 {CREAT TRUNC WRONLY}]
    set x [tkMotifFDialog_Create foo open {}]
    set i [lsearch [$foo(fList) get 0 end] ~nosuchuser1]
    expr {$i >= 0}
} 1

test xmfbox-2.5 {tkMotifFDialog_BrowseFList, ~ in file names} {
    cleanup
    close [open ./~nosuchuser1 {CREAT TRUNC WRONLY}]
    set x [tkMotifFDialog_Create foo open {}]
    set i [lsearch [$foo(fList) get 0 end] ~nosuchuser1]
    $foo(fList) selection clear 0 end
    $foo(fList) selection set $i
    tkMotifFDialog_BrowseFList $x
    $foo(sEnt) get
} $testPWD/~nosuchuser1

test xmfbox-2.5 {tkMotifFDialog_ActivateFList, ~ in file names} {
    cleanup
    close [open ./~nosuchuser1 {CREAT TRUNC WRONLY}]
    set x [tkMotifFDialog_Create foo open {}]
    set i [lsearch [$foo(fList) get 0 end] ~nosuchuser1]
    $foo(fList) selection clear 0 end
    $foo(fList) selection set $i
    tkMotifFDialog_BrowseFList $x
    tkMotifFDialog_ActivateFList $x
    list $foo(selectPath) $foo(selectFile) $tkPriv(selectFilePath)
} [list $testPWD ~nosuchuser1 $testPWD/~nosuchuser1]

cleanup
return
@


1.1.2.2
log
@Merged 8.0.3 changes into 8.1
@
text
@d13 1
a13 1
# RCS: @@(#) $Id$
@


1.1.2.3
log
@Updated the testsuite to use "test" namespace and commandline args
to control verbose  level and which tests get run.  Tests now work from
any working dir.
@
text
@a8 2
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
d10 4
a13 1
# RCS: @@(#) $Id: xmfbox.test,v 1.1.2.2 1998/09/30 02:19:09 stanton Exp $
d15 2
a16 2
if {[lsearch [namespace children] ::test] == -1} {
    source [file join [pwd] [file dirname [info script]] defs.tcl]
a144 1
# cleanup
a145 1
::test::cleanupTests
@


1.1.2.4
log
@- changed ::test to ::tcltest
- made many tests more atomic (still more work to do here)
- defs.tcl is now identicle for tcl and tk
@
text
@d12 1
a12 1
# RCS: @@(#) $Id: xmfbox.test,v 1.1.2.3 1999/03/11 18:51:25 hershey Exp $
d14 1
a14 1
if {[lsearch [namespace children] ::tcltest] == -1} {
d18 6
d68 1
a68 1
test xmfbox-1.1 {tkMotifFDialog_Create, -parent switch} {unixOnly} {
d75 1
a75 1
test xmfbox-1.2 {tkMotifFDialog_Create, -parent switch} {unixOnly} {
d84 1
a84 1
test xmfbox-2.1 {tkMotifFDialog_InterpFilter, ~ in dir names} {unixOnly} {
d93 1
a93 1
test xmfbox-2.2 {tkMotifFDialog_InterpFilter, ~ in file names} {unixOnly} {
d102 1
a102 1
test xmfbox-2.3 {tkMotifFDialog_Update, ~ in file names} {unixOnly} {
d113 1
a113 1
test xmfbox-2.4 {tkMotifFDialog_LoadFile, ~ in file names} {unixOnly} {
d121 1
a121 1
test xmfbox-2.5 {tkMotifFDialog_BrowseFList, ~ in file names} {unixOnly} {
d132 1
a132 1
test xmfbox-2.5 {tkMotifFDialog_ActivateFList, ~ in file names} {unixOnly} {
d146 1
a146 1
::tcltest::cleanupTests
a147 11











@


1.1.2.5
log
@lint:  changed a tcltest namespace variable name from tmpDir to
       workingDir.
changes:  made more tests atomic.
README is now updated to match new test suite features.
@
text
@d12 1
a12 1
# RCS: @@(#) $Id: xmfbox.test,v 1.1.2.4 1999/03/24 01:17:22 hershey Exp $
a141 1

@


