Mercurial > hg > xemacs-beta
changeset 4415:bceb3e285ae7
case-tests.el: fix it on non-DEBUG_XEMACS; save standard-case-table, use it
2008-01-30 Aidan Kehoe <kehoea@parhasard.net>
* automated/case-tests.el (pristine-case-table):
New var, reflecting the standard case table before case-table.el
messes with it.
* automated/case-tests.el:
Call Skip-Test-Unless correctly, following Vin's report of
20a807210801300635v7533d26rdb32a8d82fb4239b@mail.gmail.com .
Use pristine-case-table, add in a couple more tests.
* automated/test-harness.el (test-harness-from-buffer):
Update the error message in the light of tests skipped for other
reasons (not to do with absent packages). In this case, because
we're exposing diagnostics in a DEBUG_XEMACS build that are no
appropriate to expose to non-DEBUG_XEMACS builds.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Wed, 30 Jan 2008 22:33:29 +0100 |
parents | df576f30c1d8 |
children | 930bb9cba65a |
files | tests/ChangeLog tests/automated/case-tests.el tests/automated/test-harness.el |
diffstat | 3 files changed, 37 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/ChangeLog Wed Jan 30 09:26:59 2008 +0100 +++ b/tests/ChangeLog Wed Jan 30 22:33:29 2008 +0100 @@ -1,3 +1,18 @@ +2008-01-30 Aidan Kehoe <kehoea@parhasard.net> + + * automated/case-tests.el (pristine-case-table): + New var, reflecting the standard case table before case-table.el + messes with it. + * automated/case-tests.el: + Call Skip-Test-Unless correctly, following Vin's report of + 20a807210801300635v7533d26rdb32a8d82fb4239b@mail.gmail.com . + Use pristine-case-table, add in a couple more tests. + * automated/test-harness.el (test-harness-from-buffer): + Update the error message in the light of tests skipped for other + reasons (not to do with absent packages). In this case, because + we're exposing diagnostics in a DEBUG_XEMACS build that are no + appropriate to expose to non-DEBUG_XEMACS builds. + 2008-01-30 Aidan Kehoe <kehoea@parhasard.net> * automated/case-tests.el:
--- a/tests/automated/case-tests.el Wed Jan 30 09:26:59 2008 +0100 +++ b/tests/automated/case-tests.el Wed Jan 30 22:33:29 2008 +0100 @@ -30,6 +30,16 @@ ;; Test case-table related functionality. +(defvar pristine-case-table nil + "The standard case table, without manipulation from case-tests.el") + +(setq pristine-case-table (or + ;; This is the compiled run; we've retained + ;; it from the interpreted run. + pristine-case-table + ;; This is the interpreted run; set it. + (copy-case-table (standard-case-table)))) + (Assert (case-table-p (standard-case-table))) ;; Old case table test. (Assert (case-table-p (list @@ -277,15 +287,17 @@ (Skip-Test-Unless (boundp 'debug-xemacs-searches) ; normal when we have DEBUG_XEMACS "not a DEBUG_XEMACS build" + "checks that the algorithm chosen by #'search-forward is relatively sane" (let ((debug-xemacs-searches 1)) (with-temp-buffer + (set-case-table pristine-case-table) (insert "\n\nDer beruhmte deutsche Fleiss\n\n") (goto-char (point-min)) - (search-forward "Fleiss") + (Assert (search-forward "Fleiss")) (delete-region (point-min) (point-max)) (insert "\n\nDer beruhmte deutsche Flei\xdf\n\n") (goto-char (point-min)) - (search-forward "Flei\xdf") + (Assert (search-forward "Flei\xdf")) (Assert (eq 'boyer-moore search-algorithm-used)) (delete-region (point-min) (point-max)) (when (featurep 'mule) @@ -297,8 +309,10 @@ (Assert (eq 'boyer-moore search-algorithm-used)) (insert (make-char 'latin-iso8859-9 #xfd)) (goto-char (point-min)) - (Assert - (search-forward (format "Fle%c\xdf" - (make-char 'latin-iso8859-9 #xfd)))) + (Assert (search-forward "Flei\xdf")) + (Assert (eq 'simple-search search-algorithm-used)) + (goto-char (point-min)) + (Assert (search-forward (format "Fle%c\xdf" + (make-char 'latin-iso8859-9 #xfd)))) (Assert (eq 'simple-search search-algorithm-used))))))
--- a/tests/automated/test-harness.el Wed Jan 30 09:26:59 2008 +0100 +++ b/tests/automated/test-harness.el Wed Jan 30 22:33:29 2008 +0100 @@ -444,9 +444,9 @@ skipped-test-reasons) (when (> (length reasons) 1) (setq summary-msg (concat summary-msg reasons " - Probably XEmacs cannot find your installed packages. Set EMACSPACKAGEPATH - to the package hierarchy root or configure with --package-path to enable - the skipped tests."))) + It may be that XEmacs cannot find your installed packages. Set + EMACSPACKAGEPATH to the package hierarchy root or configure with + --package-path to enable the skipped tests."))) (setq test-harness-file-results-alist (cons (list filename passes total) test-harness-file-results-alist))