From xemacs-m  Wed May 21 11:24:09 1997
Received: from jagor.srce.hr (hniksic@jagor.srce.hr [161.53.2.130])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id LAA26759
	for <xemacs-beta@xemacs.org>; Wed, 21 May 1997 11:24:08 -0500 (CDT)
Received: (from hniksic@localhost)
          by jagor.srce.hr (8.8.5/8.8.4)
	  id SAA25610; Wed, 21 May 1997 18:24:02 +0200 (MET DST)
To: XEmacs Developers <xemacs-beta@xemacs.org>
Subject: Tests in event-stream.c
X-Save-Project-Gutenberg: <URL:http://www.promo.net/pg/nl/pgny_nov96.html>
X-Attribution: Hrv
X-Face: Mie8:rOV<\c/~z{s.X4A{!?vY7{drJ([U]0O=W/<W*SMo/Mv:58:*_y~ki>xDi&N7XG
        KV^$k0m3Oe/)'e%3=$PCR&3ITUXH,cK>]bci&<qQ>Ff%x_>1`T(+M2Gg/fgndU%k*ft
        [(7._6e0n-V%|%'[c|q:;}td$#INd+;?!-V=c8Pqf}3J
X-Windows: a terminal disease.
From: Hrvoje Niksic <hniksic@srce.hr>
Date: 21 May 1997 18:24:01 +0200
Message-ID: <kig67wc4wv2.fsf@jagor.srce.hr>
Lines: 34
X-Mailer: Gnus v5.4.52/XEmacs 20.2

Since my recent-keys patch changed event-stream.c, I tried to run the
recommended tests.  I found that, while I break nothing, some tests do 
misbehave.  Specifically:

(setq x (list (read-char) quit-flag))^J^G

According to the comment, this should set `x' to (7 t), without any
result printed.  However, in all the versions of XEmacs I've tried it
on (19.13, 20.2 and 20.3-b1+recent-keys patch) it prints:

(?\^G nil)             ; or (7 nil) on 19.13

...and sets x to the same value.  So, the second argument is wrong,
and the test fails.  GNU Emacs never prints anything, nor does it set
`x'.

The following works correctly on X, but fails on TTY-s:

(defun tst ()
 (list (condition-case c
           (sleep-for 20)
	   (quit c))
	 (read-char)))

(tst)^Ja^G    ==>  ((quit) 97) with no signal
(tst)^J^Ga    ==>  ((quit) 97) with no signal
(tst)^Jabc^G  ==>  ((quit) 97) with no signal, and "bc" inserted in buffer

On TTY-s tests #1 and #3 seem to signal.

-- 
Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
Oh lord won't you buy me a color TV...

