summaryrefslogtreecommitdiff
path: root/test/lisp/format-spec-tests.el
diff options
context:
space:
mode:
authorAndrea Corallo <akrl@sdf.org>2021-01-02 10:11:15 +0100
committerAndrea Corallo <akrl@sdf.org>2021-01-02 10:11:15 +0100
commit5db5064395c251a822e429e19ddecb74a974b6ef (patch)
tree2e04729a03d5fc68d0caef3a16e00349b6d413fc /test/lisp/format-spec-tests.el
parent9420ea6e0840bffcb140d3677dfdabb9251c1f63 (diff)
parent0f561ee55348ff451600cc6027db5940ee14606f (diff)
downloademacs-5db5064395c251a822e429e19ddecb74a974b6ef.tar.gz
emacs-5db5064395c251a822e429e19ddecb74a974b6ef.tar.bz2
emacs-5db5064395c251a822e429e19ddecb74a974b6ef.zip
Merge remote-tracking branch 'savannah/master' into HEAD
Diffstat (limited to 'test/lisp/format-spec-tests.el')
-rw-r--r--test/lisp/format-spec-tests.el12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/lisp/format-spec-tests.el b/test/lisp/format-spec-tests.el
index 11882217afb..ff2abdeaad5 100644
--- a/test/lisp/format-spec-tests.el
+++ b/test/lisp/format-spec-tests.el
@@ -1,6 +1,6 @@
;;; format-spec-tests.el --- tests for format-spec.el -*- lexical-binding: t -*-
-;; Copyright (C) 2019-2020 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2021 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -178,4 +178,14 @@
(should (equal (format-spec "foo %>4b zot" '((?b . "longbar")))
"foo long zot")))
+(ert-deftest format-spec-split ()
+ (should (equal (format-spec "foo %b bar" '((?b . "zot")) nil t)
+ '("foo " "zot" " bar")))
+ (should (equal (format-spec "%b bar" '((?b . "zot")) nil t)
+ '("zot" " bar")))
+ (should (equal (format-spec "%b" '((?b . "zot")) nil t)
+ '("zot")))
+ (should (equal (format-spec "foo %b" '((?b . "zot")) nil t)
+ '("foo " "zot"))))
+
;;; format-spec-tests.el ends here