mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-06-14 12:31:25 +00:00
These will be resubmitted as patches for review. Revert "Repair another test bollixed by aggressive optimization." This reverts commit47735e0243. Revert "Repair ab ecal test by making a variable kexical," This reverts commitca42055b0c. Revert "Complete the test set for floatfns,c." This reverts commit1b0c8d6b95. Revert "Tesrts for the portable primitives in fileio.c." This reverts commita339c6827c. Revert "Tests for primitives in coding.c and charset.c." This reverts commit5749b2e4f4. Revert "Tests for primitives from the character.c module." This reverts commitb09f8df206. Revert "Tests for the lreaf.c amd print.c primitives." This reverts commitd7a3d442b4. Revert "Tests for remaining functions iun eval.c." This reverts commitcd038e5617. Revert "Completing test coverage for dataa.c orimitives." This reverts commita6e19d6179. Revert "More correctness tesrs for orinitives from fns.c." This reverts commit40ff4512ad. Revert "More tests for edit functions, buffers, and markers." This reverts commit67e8f87562. Revert "Added more buffer/marker/editing test coverage." This reverts commit3dda4b85e8. Revert "Category/charset/coding + char-table tests." This reverts commit7a93a7b334. Revert "More test coverage improvements." This reverts commitfc7339c46d. Revert "More test coverage improvements." This reverts commit95329bf445. Revert "More test coverage improvements for ERT." This reverts commite42c579a54. Revert "Crrections to tedt coverrage extensuion after bootstrap build." This reverts commit90af3295c7. Revert "Improve test coverage of builtin predicates." This reverts commit6eb170b007. Revert "Tests for 2 marker primitives previously not covered." This reverts commit6d7f0acf9c. Revert "Tests for 7 editor primitives previously not covered." This reverts commitbb403e70ae.
47 lines
1.9 KiB
EmacsLisp
47 lines
1.9 KiB
EmacsLisp
;;; character-tests.el --- tests for character.c -*- lexical-binding:t -*-
|
|
|
|
;; Copyright (C) 2021-2026 Free Software Foundation, Inc.
|
|
|
|
;; This file is part of GNU Emacs.
|
|
|
|
;; GNU Emacs 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 3 of the License, or
|
|
;; (at your option) any later version.
|
|
|
|
;; GNU Emacs 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 GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
;;; Code:
|
|
|
|
(require 'ert)
|
|
|
|
(ert-deftest character-test-string-width ()
|
|
"Test `string-width' with and without compositions."
|
|
(should (= (string-width "1234") 4))
|
|
(should (= (string-width "12\t34") (+ 4 tab-width)))
|
|
(should (= (string-width "áëòç") 4))
|
|
(should (= (string-width "áëòç") 4))
|
|
(should (= (string-width "הַרְבֵּה אַהֲבָה") 9))
|
|
(should (= (string-width "1234" 1 3) 2))
|
|
(should (= (string-width "1234" nil -1) 3))
|
|
(should (= (string-width "1234" 2) 2))
|
|
(should-error (string-width "1234" nil 5))
|
|
(should-error (string-width "1234" -5))
|
|
(should (= (string-width "12\t34") (+ 4 tab-width)))
|
|
(should (= (string-width "1234\t56") (+ 6 tab-width)))
|
|
(should (= (string-width "áëòç") 4))
|
|
(should (= (string-width "áëòç" nil 3) 3))
|
|
(should (= (string-width "áëòç" 1 3) 2))
|
|
(should (= (string-width "áëòç" nil 2) 1))
|
|
(should (= (string-width "áëòç" nil 3) 2))
|
|
(should (= (string-width "áëòç" nil 4) 2))
|
|
(should (= (string-width "הַרְבֵּה אַהֲבָה") 9))
|
|
(should (= (string-width "הַרְבֵּה אַהֲבָה" nil 8) 4)))
|
|
|
|
;;; character-tests.el ends here
|