(with-temp-buffer
(should (equal-including-properties
filtered-str
- (mapconcat ansi-filt strs ""))))
+ (mapconcat ansi-filt strs))))
;; Tests for `ansi-color-filter-region'
(with-temp-buffer
(with-temp-buffer
(should (ansi-color-tests-equal-props
propertized-str
- (mapconcat ansi-app strs ""))))
+ (mapconcat ansi-app strs))))
;; Tests for `ansi-color-apply-on-region'
(with-temp-buffer
(defun char-fold--random-word (n)
(mapconcat (lambda (_) (string (+ 9 (random 117))))
- (make-list n nil) ""))
+ (make-list n nil)))
(defun char-fold--ascii-upcase (string)
"Like `upcase' but acts on ASCII characters only."
(dolist (file '(a b c d))
(make-empty-file (expand-file-name (symbol-name file) testdir)))
(should (= 6 (length (directory-files testdir))))
- (should (equal "abcd" (mapconcat 'identity (directory-files
- testdir nil nod) "")))
+ (should (equal "abcd" (mapconcat #'identity (directory-files
+ testdir nil nod))))
(should (= 2 (length (directory-files testdir nil "[bc]"))))
(should (= 3 (length (directory-files testdir nil nod nil 3))))
(dolist (file '(5 4 3 2 1))
(fn3 (lambda (x _y _z) (string-to-char (format "%S" x)))))
(should (equal lst (cl-map 'list fn1 lst)))
(should (equal (vconcat lst2) (cl-map 'vector fn2 lst lst2)))
- (should (equal (mapconcat (lambda (x) (format "%S" x)) lst "")
+ (should (equal (mapconcat (lambda (x) (format "%S" x)) lst)
(cl-map 'string fn3 lst lst2 lst3)))))
(ert-deftest cl-extra-test-maplist ()
(defun md4-tests-digest->hex (str)
"Print digest STR in hexadecimal."
- (mapconcat (lambda (x) (format "%02x" x)) str ""))
+ (mapconcat (lambda (x) (format "%02x" x)) str))
(ert-deftest md4-test-rfc1320 ()
"Verify the test suite results in RFC 1320.
(should (equal (encode-hex-string
(hmac-md5 (decode-hex-string
(mapconcat (lambda (c) (concat (list c) "d"))
- (make-string 50 ?c) ""))
+ (make-string 50 ?c)))
(decode-hex-string "0102030405060708090a0b0c0d0e0f10111213141516171819")))
"697eaf0aca3a3aea3a75164746ffaa79"))
(mapconcat (lambda (_) (string (let ((c (random 52)))
(+ (if (> c 25) 71 65)
c))))
- (make-list n nil) ""))
+ (make-list n nil)))
(defun sort-tests--insert-words-sort-and-compare (words separator function reverse less-predicate)
(with-temp-buffer
(let ((default "foo") res)
(cl-letf (((symbol-function 'read-string)
(lambda (_prompt &optional _init _hist def _inher-input) def)))
- (setq res (read-passwd "pass: " 'confirm (mapconcat #'string default "")))
+ (setq res (read-passwd "pass: " 'confirm (mapconcat #'string default)))
(should (string= default res)))))
(ert-deftest subr-tests--gensym ()
(defun tabify-tests--test-changes (fun changes width)
(with-temp-buffer
(let ((tab-width width))
- (insert (mapconcat #'car changes ""))
+ (insert (mapconcat #'car changes))
(funcall fun (point-min) (point-max))
- (should (equal (buffer-string) (mapconcat #'cadr changes ""))))))
+ (should (equal (buffer-string) (mapconcat #'cadr changes))))))
(ert-deftest tabify-tests-untabify ()
(let ((changes '(("***\n" "***\n")
errors)))
(setq expected (cdr expected)))))
(when errors
- (ert-fail (mapconcat (lambda (line) line) (nreverse errors) "")))))
+ (ert-fail (mapconcat #'identity (nreverse errors))))))
(defconst casefiddle-tests--characters
errors)))
(setq props (cdr props) tabs (cdr tabs) expected (cdr expected)))))
(when errors
- (mapconcat (lambda (line) line) (nreverse errors) "")))))
+ (mapconcat #'identity (nreverse errors))))))
(ert-deftest casefiddle-tests-casing-character ()
errors)))
(setq funcs (cdr funcs) expected (cdr expected)))))
(when errors
- (mapconcat (lambda (line) line) (nreverse errors) "")))))
+ (mapconcat (lambda (line) line) (nreverse errors))))))
(ert-deftest casefiddle-tests-casing-word ()
nibbles)
(setf v (nthcdr 4 v)))
(mapconcat (lambda (n) (format "%X" n))
- (nreverse nibbles)
- "")))
+ (nreverse nibbles))))
(defun test-bool-vector-count-consecutive-tc (desc)
"Run a test case for `bool-vector-count-consecutive'.
(should (string= (mapconcat #'identity '("Ä" "ø" "☭" "தமிழ்") "_漢字_")
"Ä_漢字_ø_漢字_☭_漢字_தமிழ்"))
;; vector
- (should (string= (mapconcat #'identity ["a" "b"] "") "ab"))
+ (should (string= (mapconcat #'identity ["a" "b"]) "ab"))
;; bool-vector
- (should (string= (mapconcat #'identity [nil nil] "") ""))
+ (should (string= (mapconcat #'identity [nil nil]) ""))
(should-error (mapconcat #'identity [nil nil t])
:type 'wrong-type-argument))
"Printing observes `print-continuous-numbering'."
;; cl-print does not support print-continuous-numbering.
:expected-result (if (eq (symbol-function #'print-tests--prin1-to-string)
- #'cl-prin1-to-string) :failed :passed)
+ #'cl-prin1-to-string)
+ :failed :passed)
(let* ((x (list 1))
(y "hello")
(g (gensym))
(print-number-table nil))
(should (string-match
"(#1=(1) #1# #2=\"hello\" #2#)(#3=#:g[[:digit:]]+ #3#)(#1# #2# #3#)#2#$"
- (mapconcat #'print-tests--prin1-to-string `((,x ,x ,y ,y) (,g ,g) (,x ,y ,g) ,y) ""))))
+ (mapconcat #'print-tests--prin1-to-string
+ `((,x ,x ,y ,y) (,g ,g) (,x ,y ,g) ,y)))))
;; This is the special case for byte-compile-output-docform
;; mentioned in a comment in print_preprocess. When
(should (equal 1 (with-current-buffer stdout-buffer
(point-max))))
(should (equal "hello stdout!\n"
- (mapconcat #'identity (nreverse stdout-output) "")))
+ (mapconcat #'identity (nreverse stdout-output))))
(should stderr-sentinel-called)
(should (equal 1 (with-current-buffer stderr-buffer
(point-max))))
(should (equal "hello stderr!\n"
- (mapconcat #'identity (nreverse stderr-output) ""))))))
+ (mapconcat #'identity (nreverse stderr-output)))))))
(ert-deftest set-process-filter-t ()
"Test setting process filter to t and back." ;; Bug#36591