Mercurial > hg > xemacs-beta
diff tests/automated/lisp-tests.el @ 5039:f8ae1031c706
merge
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Sat, 20 Feb 2010 19:04:55 -0600 |
parents | 9624523604c5 |
children | 0f66906b6e37 |
line wrap: on
line diff
--- a/tests/automated/lisp-tests.el Sat Feb 20 03:46:22 2010 -0600 +++ b/tests/automated/lisp-tests.el Sat Feb 20 19:04:55 2010 -0600 @@ -1,4 +1,4 @@ -;; Copyright (C) 1998 Free Software Foundation, Inc. +;; Copyright (C) 1998 Free Software Foundation, Inc. -*- coding: iso-8859-1 -*- ;; Author: Martin Buchholz <martin@xemacs.org> ;; Maintainer: Martin Buchholz <martin@xemacs.org> @@ -973,6 +973,12 @@ (car y)) x))) +(Assert-eql + (length (multiple-value-list + (car (mapcar #'(lambda (argument) (floor argument)) (list pi e))))) + 1 + "checking multiple values are correctly discarded in mapcar") + ;;----------------------------------------------------- ;; Test vector functions ;;----------------------------------------------------- @@ -1071,6 +1077,76 @@ '("foobar")) ;;----------------------------------------------------- +;; Test split-string-by-char +;;----------------------------------------------------- + +(Assert + (equal + (split-string-by-char + #r"re\:ee:this\\is\\text\\\\:oo\ps: +Eine Sprache, die stagnirt, ist zu vergleichen mit einem See, dem der +bisherige Quellenzufluß versiegt oder abgeleitet wird. Aus dem Wasser, +worüber der Geist Gottes schwebte, wird Sumpf und Moder, worüber die +unreinen\: Geister brüten.\\ +Serum concentrations of vitamin E: (alpha-tocopherol) depend on the liver, +which takes up the nutrient after the various forms are absorbed from the +small intestine. The liver preferentially resecretes only alpha-tocopherol +via the hepatic alpha-tocopherol transfer protein" + ?: ?\\) + '("re:ee" "this\\is\\text\\\\" "oops" " +Eine Sprache, die stagnirt, ist zu vergleichen mit einem See, dem der +bisherige Quellenzufluß versiegt oder abgeleitet wird. Aus dem Wasser, +worüber der Geist Gottes schwebte, wird Sumpf und Moder, worüber die +unreinen: Geister brüten.\\ +Serum concentrations of vitamin E" " (alpha-tocopherol) depend on the liver, +which takes up the nutrient after the various forms are absorbed from the +small intestine. The liver preferentially resecretes only alpha-tocopherol +via the hepatic alpha-tocopherol transfer protein"))) +(Assert + (equal + (split-string-by-char + #r"re\:ee:this\\is\\text\\\\:oo\ps: +Eine Sprache, die stagnirt, ist zu vergleichen mit einem See, dem der +bisherige Quellenzufluß versiegt oder abgeleitet wird. Aus dem Wasser, +worüber der Geist Gottes schwebte, wird Sumpf und Moder, worüber die +unreinen\: Geister brüten.\\ +Serum concentrations of vitamin E: (alpha-tocopherol) depend on the liver, +which takes up the nutrient after the various forms are absorbed from the +small intestine. The liver preferentially resecretes only alpha-tocopherol +via the hepatic alpha-tocopherol transfer protein" + ?: ?\x00) + '("re\\" "ee" "this\\\\is\\\\text\\\\\\\\" "oo\\ps" " +Eine Sprache, die stagnirt, ist zu vergleichen mit einem See, dem der +bisherige Quellenzufluß versiegt oder abgeleitet wird. Aus dem Wasser, +worüber der Geist Gottes schwebte, wird Sumpf und Moder, worüber die +unreinen\\" " Geister brüten.\\\\ +Serum concentrations of vitamin E" " (alpha-tocopherol) depend on the liver, +which takes up the nutrient after the various forms are absorbed from the +small intestine. The liver preferentially resecretes only alpha-tocopherol +via the hepatic alpha-tocopherol transfer protein"))) +(Assert + (equal + (split-string-by-char + #r"re\:ee:this\\is\\text\\\\:oo\ps: +Eine Sprache, die stagnirt, ist zu vergleichen mit einem See, dem der +bisherige Quellenzufluß versiegt oder abgeleitet wird. Aus dem Wasser, +worüber der Geist Gottes schwebte, wird Sumpf und Moder, worüber die +unreinen\: Geister brüten.\\ +Serum concentrations of vitamin E: (alpha-tocopherol) depend on the liver, +which takes up the nutrient after the various forms are absorbed from the +small intestine. The liver preferentially resecretes only alpha-tocopherol +via the hepatic alpha-tocopherol transfer protein" ?\\) + '("re" ":ee:this" "" "is" "" "text" "" "" "" ":oo" "ps: +Eine Sprache, die stagnirt, ist zu vergleichen mit einem See, dem der +bisherige Quellenzufluß versiegt oder abgeleitet wird. Aus dem Wasser, +worüber der Geist Gottes schwebte, wird Sumpf und Moder, worüber die +unreinen" ": Geister brüten." "" " +Serum concentrations of vitamin E: (alpha-tocopherol) depend on the liver, +which takes up the nutrient after the various forms are absorbed from the +small intestine. The liver preferentially resecretes only alpha-tocopherol +via the hepatic alpha-tocopherol transfer protein"))) + +;;----------------------------------------------------- ;; Test near-text buffer functions. ;;----------------------------------------------------- (with-temp-buffer