# HG changeset patch # User Aidan Kehoe # Date 1320844579 0 # Node ID 391d809fa4e9b1f3f813ff1141df16d802824195 # Parent cc8ea7ed4286d0eca21c76c96f9787025d2b8d86 Update tests that have started failing because of changed design decisions. 2011-11-09 Aidan Kehoe Update some tests that have started failing because of some changed design decisions. * automated/lisp-tests.el (eq): (type-of 42) now returns the symbol fixnum. * automated/lisp-tests.el (needs-lexical-context): (function ...) doesn't create a lexical context, and this is now the case in interpreted as well as in compiled code. * automated/mule-tests.el (featurep): Silence messages when byte-compiling files; if a file doesn't have the escape-quoted coding cookie, it will now have the raw-text-unix coding cookie, look for that instead of looking for the absence of the escape-quoted coding cookie. diff -r cc8ea7ed4286 -r 391d809fa4e9 tests/ChangeLog --- a/tests/ChangeLog Wed Nov 09 12:51:10 2011 +0000 +++ b/tests/ChangeLog Wed Nov 09 13:16:19 2011 +0000 @@ -1,3 +1,18 @@ +2011-11-09 Aidan Kehoe + + Update some tests that have started failing because of some + changed design decisions. + * automated/lisp-tests.el (eq): + (type-of 42) now returns the symbol fixnum. + * automated/lisp-tests.el (needs-lexical-context): + (function ...) doesn't create a lexical context, and this is now the + case in interpreted as well as in compiled code. + * automated/mule-tests.el (featurep): + Silence messages when byte-compiling files; if a file doesn't have + the escape-quoted coding cookie, it will now have the + raw-text-unix coding cookie, look for that instead of looking for + the absence of the escape-quoted coding cookie. + 2011-10-03 Aidan Kehoe * automated/case-tests.el (uni-mappings): diff -r cc8ea7ed4286 -r 391d809fa4e9 tests/automated/lisp-tests.el --- a/tests/automated/lisp-tests.el Wed Nov 09 12:51:10 2011 +0000 +++ b/tests/automated/lisp-tests.el Wed Nov 09 13:16:19 2011 +0000 @@ -987,7 +987,7 @@ ;;----------------------------------------------------- (Assert (eq (type-of load-path) 'cons)) (Assert (eq (type-of obarray) 'vector)) -(Assert (eq (type-of 42) 'integer)) +(Assert (eq (type-of 42) 'fixnum)) (Assert (eq (type-of ?z) 'character)) (Assert (eq (type-of "42") 'string)) (Assert (eq (type-of 'foo) 'symbol)) @@ -2907,12 +2907,9 @@ third #'(lambda () (return-from awkward 0))) first))))) - (if (compiled-function-p - (ignore-errors (indirect-function #'needs-lexical-context))) - (Known-Bug-Expect-Failure - (Assert (eql 0 (needs-lexical-context 2 nil nil)) - "the function special operator doesn't create a lexical context.")) - (Assert (eql 0 (needs-lexical-context 2 nil nil))))) + (Known-Bug-Expect-Failure + (Assert (eql 0 (needs-lexical-context 2 nil nil)) + "the function special operator doesn't create a lexical context."))) ;; Test symbol-macrolet with symbols with identical string names. diff -r cc8ea7ed4286 -r 391d809fa4e9 tests/automated/mule-tests.el --- a/tests/automated/mule-tests.el Wed Nov 09 12:51:10 2011 +0000 +++ b/tests/automated/mule-tests.el Wed Nov 09 13:16:19 2011 +0000 @@ -654,25 +654,26 @@ (let* ((temporary-file-name (make-temp-name (expand-file-name "zjPQ2Pk" (temp-directory)))) - (byte-compile-result (byte-compile-from-buffer - (current-buffer) temporary-file-name - nil))) + (byte-compile-result + (Silence-Message (byte-compile-from-buffer + (current-buffer) temporary-file-name + nil)))) (Assert (string-match "^;;;###coding system: escape-quoted" (buffer-substring nil nil byte-compile-result)))))) - (Assert-elc-has-no-specified-encoding () + (Assert-elc-is-raw-text-unix () "Assert the current buffer has no coding cookie if compiled." (save-excursion (let* ((temporary-file-name (make-temp-name (expand-file-name "zjPQ2Pk" (temp-directory)))) - (byte-compile-result (byte-compile-from-buffer - (current-buffer) temporary-file-name - nil))) - (Assert (not (string-match - ";;;###coding system:" - (buffer-substring nil nil - byte-compile-result)))))))) + (byte-compile-result + (Silence-Message + (byte-compile-from-buffer (current-buffer) + temporary-file-name nil)))) + (Assert (string-match + "^;;;###coding system: raw-text-unix" + (buffer-substring nil nil byte-compile-result))))))) (insert ;; Create a buffer with Unicode escapes. The #'read call is at ;; runtime, because this file may be compiled and read in a non-Mule @@ -730,7 +731,7 @@ #r" (defvar testing-mule-compilation-handling (string ?\xab)) ;; LEFT-POINTING DOUBLE ANGLE QUOTATION MARK") - (Assert-elc-has-no-specified-encoding) + (Assert-elc-is-raw-text-unix) (delete-region (point-min) (point-max)) (insert @@ -738,7 +739,7 @@ #ru" (defvar testing-mule-compilation-handling (string ?\u00AB)) ;; LEFT-POINTING DOUBLE ANGLE QUOTATION MARK\")") - (Assert-elc-has-no-specified-encoding) + (Assert-elc-is-raw-text-unix) (delete-region (point-min) (point-max)) (insert @@ -746,7 +747,7 @@ #r" (defvar testing-mule-compilation-handling (string ?A)) ;; LATIN CAPITAL LETTER A") - (Assert-elc-has-no-specified-encoding) + (Assert-elc-is-raw-text-unix) (delete-region (point-min) (point-max)) ;; There used to be a bug here because the coding-cookie insertion code