# HG changeset patch # User stephent # Date 1174838254 0 # Node ID 4035bd42c75e989ad703d9327ddae5655c01ee0e # Parent f73b455b14726d6f30475f6254b837500afeac1a [xemacs-hg @ 2007-03-25 15:57:32 by stephent] Regression test for OG's patch. <87648pwbq1.fsf@uwakimon.sk.tsukuba.ac.jp> diff -r f73b455b1472 -r 4035bd42c75e tests/ChangeLog --- 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 + + * 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 * automated/iso-ir-196-test.el: diff -r f73b455b1472 -r 4035bd42c75e tests/automated/syntax-tests.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.