comparison tests/automated/region-tests.el @ 3472:43b4a54fbf66

[xemacs-hg @ 2006-06-24 14:30:36 by stephent] Silence commands that set marks etc in test suite. <87wtb67hm2.fsf@tleepslib.sk.tsukuba.ac.jp>
author stephent
date Sat, 24 Jun 2006 14:30:39 +0000
parents 29555dfb1592
children 189fb67ca31a
comparison
equal deleted inserted replaced
3471:3b1f8220a65e 3472:43b4a54fbf66
41 ;; Message-ID: <zmxwtboa.fsf@smtprelay.t-online.de> 41 ;; Message-ID: <zmxwtboa.fsf@smtprelay.t-online.de>
42 (with-temp-buffer 42 (with-temp-buffer
43 ;; Using active regions 43 ;; Using active regions
44 (let ((zmacs-regions t) 44 (let ((zmacs-regions t)
45 (first-buffer (current-buffer))) 45 (first-buffer (current-buffer)))
46 (insert (buffer-name)) 46 (Silence-Message
47 (insert (buffer-name)))
47 (Assert (not (region-exists-p))) 48 (Assert (not (region-exists-p)))
48 (Assert (not (region-active-p))) 49 (Assert (not (region-active-p)))
49 (mark-whole-buffer) 50 (Silence-Message
51 (mark-whole-buffer))
50 (Assert (region-exists-p)) 52 (Assert (region-exists-p))
51 (Assert (region-active-p)) 53 (Assert (region-active-p))
52 ;; Turn off active regions 54 ;; Turn off active regions
53 (setq zmacs-regions nil) 55 (setq zmacs-regions nil)
54 ;; Region still exists 56 ;; Region still exists
60 ;; Region still exists 62 ;; Region still exists
61 (Assert (region-exists-p)) 63 (Assert (region-exists-p))
62 ;; Region is active again 64 ;; Region is active again
63 (Assert (region-active-p)) 65 (Assert (region-active-p))
64 (with-temp-buffer 66 (with-temp-buffer
65 (insert (buffer-name)) 67 (Silence-Message
68 (insert (buffer-name)))
66 ;; Region exists in first buffer, not this second one 69 ;; Region exists in first buffer, not this second one
67 (Assert (not (region-exists-p))) 70 (Assert (not (region-exists-p)))
68 ;; Region not active in this second temp buffer 71 ;; Region not active in this second temp buffer
69 (Assert (not (region-active-p))) 72 (Assert (not (region-active-p)))
70 ;; Region still active in first temp buffer 73 ;; Region still active in first temp buffer
71 (Assert (eq (zmacs-region-buffer) first-buffer)) 74 (Assert (eq (zmacs-region-buffer) first-buffer))
72 ;; Activate region in second temp buffer 75 ;; Activate region in second temp buffer
73 (mark-whole-buffer) 76 (Silence-Message
77 (mark-whole-buffer))
74 ;; Region exists in second temp buffer 78 ;; Region exists in second temp buffer
75 (Assert (region-exists-p)) 79 (Assert (region-exists-p))
76 ;; Region active in second temp buffer 80 ;; Region active in second temp buffer
77 (Assert (region-active-p))) 81 (Assert (region-active-p)))
78 ;; Second temp buffer no longer exists 82 ;; Second temp buffer no longer exists