Skip to content

Commit

Permalink
Relocate proc setup
Browse files Browse the repository at this point in the history
  • Loading branch information
1minus1is0 committed Jan 8, 2025
1 parent d6c9574 commit b6fda71
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 24 deletions.
12 changes: 0 additions & 12 deletions tests/select.test
Original file line number Diff line number Diff line change
Expand Up @@ -96,18 +96,6 @@ proc reallyBadHandler {path type offset count} {
selection clear .
after 1500

# common setup code
proc setup {{path .f1} {display {}}} {
catch {destroy $path}
if {$display == {}} {
frame $path
} else {
toplevel $path -screen $display
wm geom $path +0+0
}
selection own $path
}

# set up a very large buffer to test INCR retrievals
set longValue ""
foreach i {a b c d e f g j h i j k l m o p q r s t u v w x y z} {
Expand Down
11 changes: 11 additions & 0 deletions tests/testutils.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,17 @@ namespace eval ::tk::test::select {
error "selection handler aborted"
}

proc setup {{path .f1} {display {}}} {
catch {destroy $path}
if {$display == {}} {
frame $path
} else {
toplevel $path -screen $display
wm geom $path +0+0
}
selection own $path
}

namespace export *
}

Expand Down
12 changes: 0 additions & 12 deletions tests/unixSelect.test
Original file line number Diff line number Diff line change
Expand Up @@ -85,18 +85,6 @@ proc reallyBadHandler {path type offset count} {
selection clear .
after 1500

# common setup code
proc setup {{path .f1} {display {}}} {
catch {destroy $path}
if {$display == {}} {
frame $path
} else {
toplevel $path -screen $display
wm geom $path +0+0
}
selection own $path
}

# set up a very large buffer to test INCR retrievals
set longValue ""
foreach i {a b c d e f g j h i j k l m o p q r s t u v w x y z} {
Expand Down

0 comments on commit b6fda71

Please sign in to comment.