changeset 3880:4035bd42c75e

[xemacs-hg @ 2007-03-25 15:57:32 by stephent] Regression test for OG's patch. <87648pwbq1.fsf@uwakimon.sk.tsukuba.ac.jp>
author stephent
date Sun, 25 Mar 2007 15:57:34 +0000
parents f73b455b1472
children 1b6a5c6e012d
files tests/ChangeLog tests/automated/syntax-tests.el
diffstat 2 files changed, 22 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/ChangeLog	Sun Mar 25 15:35:06 2007 +0000
+++ b/tests/ChangeLog	Sun Mar 25 15:57:34 2007 +0000
@@ -1,3 +1,9 @@
+2007-03-26  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* automated/syntax-tests.el: Test for regression of bug fixed by
+	Olivier Galibert <20070324221053.GA48218@dspnet.fr.eu.org>.  Test
+	by Ralf Angeli http://article.gmane.org/gmane.emacs.xemacs.beta/17353.
+
 2006-11-25  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* automated/iso-ir-196-test.el:
--- a/tests/automated/syntax-tests.el	Sun Mar 25 15:35:06 2007 +0000
+++ b/tests/automated/syntax-tests.el	Sun Mar 25 15:57:34 2007 +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@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.