changeset 4948:8b230c53075b

fix some tests in `make check', also add our own file-tests -------------------- ChangeLog entries follow: -------------------- lisp/ChangeLog addition: 2010-01-25 Ben Wing <ben@xemacs.org> * mule/cyrillic.el (koi8-c): Fix bug in #83 mapping. * mule/vietnamese.el (viscii): Fix bug in #A6 mapping. tests/ChangeLog addition: 2010-01-25 Ben Wing <ben@xemacs.org> * automated/file-tests.el: New file. * automated/mule-tests.el (featurep): * automated/test-harness.el (test-harness-from-buffer): * automated/test-harness.el (batch-test-emacs):
author Ben Wing <ben@xemacs.org>
date Mon, 25 Jan 2010 03:03:49 -0600
parents 4faad22a9fe5
children 018e13fdeaeb
files lisp/ChangeLog lisp/mule/cyrillic.el lisp/mule/vietnamese.el tests/ChangeLog tests/automated/file-tests.el tests/automated/mule-tests.el tests/automated/test-harness.el
diffstat 7 files changed, 97 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Mon Jan 25 02:48:52 2010 -0600
+++ b/lisp/ChangeLog	Mon Jan 25 03:03:49 2010 -0600
@@ -1,3 +1,10 @@
+2010-01-25  Ben Wing  <ben@xemacs.org>
+
+	* mule/cyrillic.el (koi8-c):
+	Fix bug in #83 mapping.
+	* mule/vietnamese.el (viscii):
+	Fix bug in #A6 mapping.
+
 2010-01-24  Ben Wing  <ben@xemacs.org>
 
 	* simple.el (capitalize-string-as-title):
--- a/lisp/mule/cyrillic.el	Mon Jan 25 02:48:52 2010 -0600
+++ b/lisp/mule/cyrillic.el	Mon Jan 25 03:03:49 2010 -0600
@@ -1182,7 +1182,7 @@
     (#x89 ?\u04B9) ;; CYRILLIC SMALL LETTER CHE WITH VERTICAL STROKE
     (#x8A ?\u04BB) ;; CYRILLIC SMALL LETTER SHHA
     (#x8B ?\u2580) ;; UPPER HALF BLOCK
-    (#x8C ?\u049D) ;; CYRILLIC SMALL LETTER KA WITH VERTICAL STROKE
+    (#x8C ?\u04D9) ;; CYRILLIC SMALL LETTER SCHWA
     (#x8D ?\u04E3) ;; CYRILLIC SMALL LETTER I WITH MACRON
     (#x8E ?\u04E9) ;; CYRILLIC SMALL LETTER BARRED O
     (#x8F ?\u04EF) ;; CYRILLIC SMALL LETTER U WITH MACRON
--- a/lisp/mule/vietnamese.el	Mon Jan 25 02:48:52 2010 -0600
+++ b/lisp/mule/vietnamese.el	Mon Jan 25 03:03:49 2010 -0600
@@ -111,7 +111,7 @@
     (#xA3 ?\u1EB7) ;; SMALL LETTER A WITH BREVE AND DOT BELOW
     (#xA4 ?\u1EA5) ;; SMALL LETTER A WITH CIRCUMFLEX AND ACUTE
     (#xA5 ?\u1EA7) ;; SMALL LETTER A WITH CIRCUMFLEX AND GRAVE
-    (#xA6 ?\u1EA8) ;; CAPITAL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE
+    (#xA6 ?\u1EA9) ;; SMALL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE
     (#xA7 ?\u1EAD) ;; SMALL LETTER A WITH CIRCUMFLEX AND DOT BELOW
     (#xA8 ?\u1EBD) ;; SMALL LETTER E WITH TILDE
     (#xA9 ?\u1EB9) ;; SMALL LETTER E WITH DOT BELOW
--- a/tests/ChangeLog	Mon Jan 25 02:48:52 2010 -0600
+++ b/tests/ChangeLog	Mon Jan 25 03:03:49 2010 -0600
@@ -1,3 +1,27 @@
+2010-01-25  Ben Wing  <ben@xemacs.org>
+
+	* automated/file-tests.el:
+	New file.
+	
+	* automated/mule-tests.el (featurep):
+	
+	* automated/test-harness.el (test-harness-from-buffer):
+	* automated/test-harness.el (batch-test-emacs):
+
+2010-01-25  Ben Wing  <ben@xemacs.org>
+
+	* automated/file-tests.el:
+	* automated/mule-tests.el (featurep):
+	Clean up charsets-in-HELLO test and fix the list of expected
+	charsets.
+	
+	* automated/test-harness.el (test-harness-from-buffer):
+	Reverse order of "got" and "expected" values so it matches
+	order of call to comparison.
+	
+	* automated/test-harness.el (batch-test-emacs):
+	Update doc to indicate that a directory is allowed.
+
 2010-01-14  Ben Wing  <ben@xemacs.org>
 
 	* automated/mule-tests.el (featurep):
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/automated/file-tests.el	Mon Jan 25 03:03:49 2010 -0600
@@ -0,0 +1,45 @@
+;;; file-tests.el --- test support for filesystem primitives
+
+;; Copyright (C) 2010 Ben Wing.
+
+;; Author: Ben Wing <ben@xemacs.org>
+;; Maintainer: Ben Wing <ben@xemacs.org>
+;; Created: 2010 January 25
+;; Keywords: files, filenames, file names
+
+;; This file is part of XEmacs.
+
+;; XEmacs is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; XEmacs is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with XEmacs; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Synched up with: Not in FSF.
+
+;;; Commentary:
+
+;; Test file-system support.  Opening files, file names, etc.
+;; See test-harness.el for instructions on how to run these tests.
+
+;; Test that `file-truename' is idempotent (same value when called multiple
+;; times).  Under Cygwin 1.7 as of 1-24-10, not true!
+(loop for file in (list (temp-directory)
+			(file-name-as-directory (temp-directory))
+			"/"
+			(file-name-as-directory "/")
+			(make-temp-name "foo")
+			)
+  do
+  (Assert-equal (file-truename (file-truename file)) (file-truename file)))
+
+
--- a/tests/automated/mule-tests.el	Mon Jan 25 02:48:52 2010 -0600
+++ b/tests/automated/mule-tests.el	Mon Jan 25 03:03:49 2010 -0600
@@ -551,25 +551,20 @@
   ;;---------------------------------------------------------------
   (with-temp-buffer
     (insert-file-contents (locate-data-file "HELLO"))
-    (Assert-equal 
-             ;; The sort is to make the algorithm of charsets-in-region
-             ;; irrelevant.
-             (sort (charsets-in-region (point-min) (point-max))
-                   #'string<)
-             '(ascii chinese-big5-1 chinese-gb2312 cyrillic-iso8859-5
-               ethiopic greek-iso8859-7 hebrew-iso8859-8 japanese-jisx0208
-               japanese-jisx0212 jit-ucs-charset-0 katakana-jisx0201
-               korean-ksc5601 latin-iso8859-1 latin-iso8859-2 thai-xtis
-               vietnamese-viscii-lower))
-    (Assert-equal 
-             (sort (charsets-in-string (buffer-substring (point-min)
-							 (point-max)))
-                   #'string<)
-             '(ascii chinese-big5-1 chinese-gb2312 cyrillic-iso8859-5
-               ethiopic greek-iso8859-7 hebrew-iso8859-8 japanese-jisx0208
-               japanese-jisx0212 jit-ucs-charset-0 katakana-jisx0201
-               korean-ksc5601 latin-iso8859-1 latin-iso8859-2 thai-xtis
-               vietnamese-viscii-lower)))
+    (let ((expected
+	   '(arabic-iso8859-6 ascii chinese-big5-1 chinese-gb2312
+	     cyrillic-iso8859-5 ethiopic greek-iso8859-7 hebrew-iso8859-8
+	     japanese-jisx0208 japanese-jisx0212 katakana-jisx0201
+	     korean-ksc5601 latin-iso8859-1 latin-iso8859-2
+	     thai-xtis vietnamese-viscii-lower)))
+      (Assert-equal
+       ;; The sort is to make the algorithm of charsets-in-region
+       ;; irrelevant.
+       (sort (charsets-in-region (point-min) (point-max))
+	     #'string<) expected)
+      (Assert-equal 
+       (sort (charsets-in-string (buffer-substring (point-min) (point-max)))
+	     #'string<) expected)))
 
   ;;---------------------------------------------------------------
   ;; Language environments, and whether the specified values are sane.
--- a/tests/automated/test-harness.el	Mon Jan 25 02:48:52 2010 -0600
+++ b/tests/automated/test-harness.el	Mon Jan 25 03:03:49 2010 -0600
@@ -303,7 +303,7 @@
 default, the unevalated comparison expressions are given.  FAILING-CASE and
 DESCRIPTION are useful when Assert is used in a loop."
 	(let* ((assertion `(,test ,testval ,expected))
-	       (failmsg `(format "expected %S, got %S" ,expected ,testval))
+	       (failmsg `(format "got %S, expected %S" ,testval ,expected))
 	       (failmsg2 (if failing-case `(concat 
 					   (format "%S, " ,failing-case)
 					   ,failmsg)
@@ -614,7 +614,10 @@
 Use this from the command line, with `-batch';
 it won't work in an interactive Emacs.
 Each file is processed even if an error occurred previously.
-For example, invoke \"xemacs -batch -f batch-test-emacs tests/*.el\""
+A directory can be given as well, and all files will be processed --
+however, the file test-harness.el, which implements the test harness,
+will be skipped.
+For example, invoke \"xemacs -batch -f batch-test-emacs tests\""
   ;; command-line-args-left is what is left of the command line (from
   ;; startup.el)
   (defvar command-line-args-left)	;Avoid 'free variable' warning