Mercurial > hg > xemacs-beta
annotate tests/automated/region-tests.el @ 5047:07dcc7000bbf
put width before height consistently, fix a real bug found in the process
-------------------- ChangeLog entries follow: --------------------
src/ChangeLog addition:
2010-02-20 Ben Wing <ben@xemacs.org>
* EmacsFrame.c (EmacsFrameRecomputeCellSize):
* faces.c (default_face_font_info):
* faces.c (default_face_width_and_height):
* faces.c (Fface_list):
* faces.h:
* frame-gtk.c (gtk_set_initial_frame_size):
* frame-gtk.c (gtk_set_frame_size):
* frame-gtk.c (gtk_recompute_cell_sizes):
* frame.c:
* frame.c (frame_conversion_internal_1):
* frame.c (change_frame_size_1):
* frame.c (change_frame_size):
* glyphs-msw.c (mswindows_combo_box_instantiate):
* glyphs-widget.c (widget_instantiate):
* glyphs-widget.c (tree_view_query_geometry):
* glyphs-widget.c (Fwidget_logical_to_character_width):
* glyphs-widget.c (Fwidget_logical_to_character_height):
* indent.c (vmotion_pixels):
* redisplay-output.c (get_cursor_size_and_location):
* redisplay-xlike-inc.c (XLIKE_output_eol_cursor):
* redisplay-xlike-inc.c (XLIKE_flash):
* redisplay.c (calculate_baseline):
* redisplay.c (start_with_point_on_display_line):
* redisplay.c (glyph_to_pixel_translation):
* redisplay.c (pixel_to_glyph_translation):
* window.c (margin_width_internal):
* window.c (frame_size_valid_p):
* window.c (frame_pixsize_valid_p):
* window.c (check_frame_size):
* window.c (set_window_pixsize):
* window.c (window_pixel_height_to_char_height):
* window.c (window_char_height_to_pixel_height):
* window.c (window_displayed_height):
* window.c (window_pixel_width_to_char_width):
* window.c (window_char_width_to_pixel_width):
* window.c (change_window_height):
* window.c (window_scroll):
* window.h:
IMPORTANT: Aidan and Carbon Repo, please pay attention and fix
appropriately!
Rename: default_face_height_and_width -> default_face_width_and_height
and reverse width/height arguments.
Reverse width/height arguments to the following functions:
-- default_face_font_info
-- default_face_height_and_width (see above)
-- check_frame_size
-- frame_size_valid_p (made into a static function)
Fix a redisplay bug where args to default_face_height_and_width
were in the wrong order.
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Sat, 20 Feb 2010 18:56:01 -0600 |
parents | 189fb67ca31a |
children | 0f66906b6e37 |
rev | line source |
---|---|
2614 | 1 ;; Copyright (C) 2005 Adrian Aichner |
2 | |
3 ;; Author: Adrian Aichner <adrian@xemacs.org> | |
4 ;; Maintainer: XEmacs Beta List <xemacs-beta@xemacs.org> | |
5 ;; Created: 2005 | |
6 ;; Keywords: tests | |
7 | |
8 ;; This file is part of XEmacs. | |
9 | |
10 ;; XEmacs is free software; you can redistribute it and/or modify it | |
11 ;; under the terms of the GNU General Public License as published by | |
12 ;; the Free Software Foundation; either version 2, or (at your option) | |
13 ;; any later version. | |
14 | |
15 ;; XEmacs is distributed in the hope that it will be useful, but | |
16 ;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
18 ;; General Public License for more details. | |
19 | |
20 ;; You should have received a copy of the GNU General Public License | |
21 ;; along with XEmacs; see the file COPYING. If not, write to the Free | |
22 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | |
23 ;; 02111-1307, USA. | |
24 | |
25 ;;; Synched up with: Not in FSF. | |
26 | |
27 ;;; Commentary: | |
28 | |
29 ;;; Test region and zmacs-region functionality | |
30 ;;; See test-harness.el | |
31 | |
32 (condition-case err | |
33 (require 'test-harness) | |
34 (file-error | |
35 (when (and (boundp 'load-file-name) (stringp load-file-name)) | |
36 (push (file-name-directory load-file-name) load-path) | |
37 (require 'test-harness)))) | |
38 | |
39 ;; Active region testing, verifying functionality of | |
40 ;; http://list-archive.xemacs.org/xemacs-patches/200502/msg00194.html | |
41 ;; Message-ID: <zmxwtboa.fsf@smtprelay.t-online.de> | |
42 (with-temp-buffer | |
43 ;; Using active regions | |
44 (let ((zmacs-regions t) | |
45 (first-buffer (current-buffer))) | |
3472 | 46 (Silence-Message |
47 (insert (buffer-name))) | |
2614 | 48 (Assert (not (region-exists-p))) |
49 (Assert (not (region-active-p))) | |
3472 | 50 (Silence-Message |
51 (mark-whole-buffer)) | |
2614 | 52 (Assert (region-exists-p)) |
53 (Assert (region-active-p)) | |
54 ;; Turn off active regions | |
55 (setq zmacs-regions nil) | |
56 ;; Region still exists | |
57 (Assert (region-exists-p)) | |
58 ;; Region is no longer active | |
59 (Assert (not (region-active-p))) | |
60 ;; Turn active regions back on | |
61 (setq zmacs-regions t) | |
62 ;; Region still exists | |
63 (Assert (region-exists-p)) | |
64 ;; Region is active again | |
65 (Assert (region-active-p)) | |
66 (with-temp-buffer | |
3472 | 67 (Silence-Message |
68 (insert (buffer-name))) | |
2614 | 69 ;; Region exists in first buffer, not this second one |
70 (Assert (not (region-exists-p))) | |
71 ;; Region not active in this second temp buffer | |
72 (Assert (not (region-active-p))) | |
73 ;; Region still active in first temp buffer | |
4855
189fb67ca31a
Create Assert-eq, Assert-equal, etc.
Ben Wing <ben@xemacs.org>
parents:
3472
diff
changeset
|
74 (Assert-eq (zmacs-region-buffer) first-buffer) |
2614 | 75 ;; Activate region in second temp buffer |
3472 | 76 (Silence-Message |
77 (mark-whole-buffer)) | |
2614 | 78 ;; Region exists in second temp buffer |
79 (Assert (region-exists-p)) | |
80 ;; Region active in second temp buffer | |
81 (Assert (region-active-p))) | |
82 ;; Second temp buffer no longer exists | |
83 (Assert (null (zmacs-region-buffer))))) |