Skip to content

Commit 714787e

Browse files
committed
Fix [9ba9729ef1]: Limitation of [send] on macOS is not reflected in documentation and tests
2 parents 0541baf + ba4ac9d commit 714787e

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

doc/send.n

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ they use some other form of authorization
9090
such as that provide by \fBxauth\fR.
9191
Under Windows, \fBsend\fR is currently disabled. Most of the
9292
functionality is provided by the \fBdde\fR command instead.
93+
.SH LIMITATIONS
94+
.PP
95+
Under macOS/aqua, the send command works only with interpreters that exist in
96+
the same process (these are returned by "winfo interps"). Invocations that
97+
target an interpreter that exists in another process don't accomplish anything.
9398
.SH EXAMPLE
9499
.PP
95100
This script fragment can be used to make an application that only runs

tests/send.test

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ test send-5.4 {ValidateName procedure} {secureserver testsend} {
135135
winfo interps
136136
} {test}
137137

138-
if {[testConstraint nonPortable] && [testConstraint xhost]} {
138+
if {[testConstraint nonPortable] && [testConstraint xhost] && [testConstraint notAqua]} {
139139
winfo interps
140140
tk appname tktest
141141
update
@@ -146,16 +146,16 @@ if {[testConstraint nonPortable] && [testConstraint xhost]} {
146146
}
147147
}
148148

149-
test send-6.1 {ServerSecure procedure} {nonPortable secureserver} {
149+
test send-6.1 {ServerSecure procedure} {nonPortable secureserver notAqua} {
150150
set a 44
151151
list [childTkProcess eval [list send [tk appname] set a 55]] $a
152152
} {55 55}
153-
test send-6.2 {ServerSecure procedure} {nonPortable secureserver xhost} {
153+
test send-6.2 {ServerSecure procedure} {nonPortable secureserver xhost notAqua} {
154154
set a 22
155155
exec xhost [exec hostname]
156156
list [catch {childTkProcess eval [list send [tk appname] set a 33]} msg] $a $msg
157157
} {0 22 {X server insecure (must use xauth-style authorization); command ignored}}
158-
test send-6.3 {ServerSecure procedure} {nonPortable secureserver xhost} {
158+
test send-6.3 {ServerSecure procedure} {nonPortable secureserver xhost notAqua} {
159159
set a abc
160160
exec xhost - [exec hostname]
161161
list [childTkProcess eval [list send [tk appname] set a new]] $a
@@ -194,7 +194,7 @@ test send-8.1 {Tk_SendCmd procedure, options} {secureserver notAqua} {
194194
childTkProcess exit
195195
lappend result $a
196196
} {66 77}
197-
test send-8.2 {Tk_SendCmd procedure, options} {secureserver altDisplay} {
197+
test send-8.2 {Tk_SendCmd procedure, options} {secureserver altDisplay notAqua} {
198198
childTkProcess create -display $env(TK_ALT_DISPLAY)
199199
tk appname xyzgorp
200200
set a homeDisplay
@@ -291,7 +291,7 @@ test send-8.16 {Tk_SendCmd procedure, bogusCommWindow} {secureserver testsend fa
291291

292292
catch {interp delete t_s_1}
293293

294-
test send-8.17 {Tk_SendCmd procedure, deferring events} {secureserver nonPortable} {
294+
test send-8.17 {Tk_SendCmd procedure, deferring events} {secureserver nonPortable notAqua} {
295295
# Non-portable because some window managers ignore "raise"
296296
# requests so can't guarantee that new app's window won't
297297
# obscure .f, thereby masking the Expose event.
@@ -311,7 +311,7 @@ test send-8.17 {Tk_SendCmd procedure, deferring events} {secureserver nonPortabl
311311
childTkProcess exit
312312
lappend result $a
313313
} {{no event yet} {no event yet} exposed}
314-
test send-8.18 {Tk_SendCmd procedure, error in remote app} {secureserver} {
314+
test send-8.18 {Tk_SendCmd procedure, error in remote app} {secureserver notAqua} {
315315
childTkProcess create
316316
set app [childTkProcess eval {tk appname}]
317317
set result [string tolower [list [catch {send $app open bad_name} msg] \
@@ -323,7 +323,7 @@ test send-8.18 {Tk_SendCmd procedure, error in remote app} {secureserver} {
323323
"open bad_name"
324324
invoked from within
325325
"send $app open bad_name"} {posix enoent {no such file or directory}}}
326-
test send-8.19 {Tk_SendCmd, using modal timeouts} {secureserver} {
326+
test send-8.19 {Tk_SendCmd, using modal timeouts} {secureserver notAqua} {
327327
childTkProcess create
328328
set app [childTkProcess eval {tk appname}]
329329
set x no
@@ -483,14 +483,14 @@ test send-10.17 {SendEventProc procedure, errorCode and errorInfo} {secureserver
483483
set errorInfo oldErrorInfo
484484
list [catch {send dummy foo} msg] $msg $errorInfo $errorCode
485485
} {4 {} oldErrorInfo oldErrorCode}
486-
test send-10.18 {SendEventProc procedure, send kills application} {secureserver testsend} {
486+
test send-10.18 {SendEventProc procedure, send kills application} {secureserver testsend notAqua} {
487487
childTkProcess create
488488
childTkProcess eval {tk appname t_s_3}
489489
set x [list [catch {send t_s_3 destroy .} msg] $msg]
490490
childTkProcess exit
491491
set x
492492
} {0 {}}
493-
test send-10.19 {SendEventProc procedure, send exits} {secureserver testsend} {
493+
test send-10.19 {SendEventProc procedure, send exits} {secureserver testsend notAqua} {
494494
childTkProcess create
495495
childTkProcess eval {tk appname t_s_3}
496496
set x [list [catch {send t_s_3 exit} msg] $msg]
@@ -556,7 +556,7 @@ test send-13.2 {DeleteProc procedure} {secureserver notAqua} {
556556
lappend result [winfo interps] [info commands send]
557557
} {{} {} foo send}
558558

559-
test send-14.1 {SendRestrictProc procedure, sends crossing from different displays} {secureserver altDisplay} {
559+
test send-14.1 {SendRestrictProc procedure, sends crossing from different displays} {secureserver altDisplay notAqua} {
560560
childTkProcess create -display $env(TK_ALT_DISPLAY)
561561
set result [childTkProcess eval "
562562
toplevel .t -screen [winfo screen .]

0 commit comments

Comments
 (0)