[AC21.5] Add regression test for: Fix copy-char-table on syntax tables

Stephen J. Turnbull stephen at xemacs.org
Sun Mar 25 12:04:54 EDT 2007


APPROVE COMMIT 21.5

Add a regression test for

 > 2007-03-24   Olivier Galibert <galibert at pobox.com>
 > 
 > 	* chartab.c (Fcopy_char_table): Simplify the mirror table
 > 	handling: never copy a mirror table, just make a new one and mark
 > 	it dirty.  Fixes http://article.gmane.org/gmane.emacs.xemacs.beta/17353

Index: tests/ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/tests/ChangeLog,v
retrieving revision 1.86
diff -u -r1.86 ChangeLog
--- tests/ChangeLog	25 Nov 2006 22:06:29 -0000	1.86
+++ tests/ChangeLog	25 Mar 2007 15:52:25 -0000
@@ -0,0 +1,6 @@
+2007-03-26  Stephen J. Turnbull  <stephen at xemacs.org>
+
+	* automated/syntax-tests.el: Test for regression of bug fixed by
+	Olivier Galibert <20070324221053.GA48218 at dspnet.fr.eu.org>.  Test
+	by Ralf Angeli http://article.gmane.org/gmane.emacs.xemacs.beta/17353.
+

Index: tests/automated/syntax-tests.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/tests/automated/syntax-tests.el,v
retrieving revision 1.6
diff -u -r1.6 syntax-tests.el
--- tests/automated/syntax-tests.el	8 Dec 2005 10:58:59 -0000	1.6
+++ tests/automated/syntax-tests.el	25 Mar 2007 15:52:25 -0000
@@ -129,6 +129,22 @@
   ;; Apply word to punctuation
   (test-syntax-table "W." 1 `(,(syntax-string-to-code "w")) 2))
 
+;; According to Ralf Angeli in
+;; http://article.gmane.org/gmane.emacs.xemacs.beta/17353:
+;; Using a fresh CVS checkout of XEmacs trunk the following snippet
+;; returns "1" when evaluated whereas it returns "5" in GNU Emacs 21.3,
+;; CVS GNU Emacs and XEmacs 21.4.15.
+;; If `set-syntax-table' is used instead of `with-syntax-table', CVS
+;; XEmacs returns "5" as well, so I suppose that there is a problem in
+;; `with-syntax-table' or a function called by it.
+
+;; Fixed 2007-03-25 Olivier Galibert <20070324221053.GA48218 at dspnet.fr.eu.org>
+(with-temp-buffer
+  (with-syntax-table (make-syntax-table)
+    (insert "foo bar")
+    (backward-sexp 1)
+    (Assert (eql (point) 5))))
+
 ;; Test forward-comment at buffer boundaries
 ;; #### The second Assert fails (once interpreted, once compiled) on 21.4.9
 ;; with sjt's version of Andy's syntax-text-property-killer patch.



More information about the XEmacs-Patches mailing list