Skip to content

Commit 937b9ee

Browse files
committed
Update tests
* lispy-test.el (lispy-ace-subword): Unite two tests with identical name (caused to fail tests). (lispy-outline-add): Update test to agree with current behaviour of lispy-meta-return (since 6efe2b4). (lispy-tilde): Rename second instance of lispy-outline-add to avoid two identical test names. (lispy--pretty-args): Agree with updated docstring of defun (since Emacs 73e75e18). ERT fails with redefined tests in batch mode: Error: error ("Test ‘lispy-ace-subword’ redefined")
1 parent fe44efd commit 937b9ee

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

lispy-test.el

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2172,10 +2172,6 @@ Insert KEY if there's no command."
21722172
(throw 'break nil))
21732173
(lispy-tab)))))
21742174

2175-
(ert-deftest lispy-ace-subword ()
2176-
(should (string= (lispy-with "|foo-bar-baz~" (lispy-ace-subword 1))
2177-
"~foo|-bar-baz")))
2178-
21792175
(ert-deftest lispy-flatten ()
21802176
(should (string= (lispy-with
21812177
"(defun square (x &optional y &rest z)\n (if y\n (cons 200 z)\n (* x x)))|\n(square 10 1 2 3)"
@@ -2386,9 +2382,9 @@ Insert KEY if there's no command."
23862382

23872383
(ert-deftest lispy-outline-add ()
23882384
(should (string= (lispy-with "|;;* Intro" "a")
2389-
";;* Intro\n;;* |")))
2385+
";;* Intro\n\n|;;* ")))
23902386

2391-
(ert-deftest lispy-outline-add ()
2387+
(ert-deftest lispy-tilde ()
23922388
(should (string= (lispy-with "(quote ~foo|)" "~")
23932389
"(quote ~~foo|)"))
23942390
(should (string= (lispy-with "(quote ~~foo|)" "~")
@@ -2595,6 +2591,8 @@ Insert KEY if there's no command."
25952591
"(progn (setq type 'norwegian-blue)\n (~setq| plumage-type 'lovely))"))))
25962592

25972593
(ert-deftest lispy-ace-subword ()
2594+
(should (string= (lispy-with "|foo-bar-baz~" (lispy-ace-subword 1))
2595+
"~foo|-bar-baz"))
25982596
(should (string= (lispy-with "|(progn (setq type 'norwegian-blue)\n (setq plumage-type 'lovely))"
25992597
(execute-kbd-macro (kbd "-g")))
26002598
"(progn (setq type 'norwegian-blue)\n (setq |plumage~-type 'lovely))"))
@@ -3245,13 +3243,14 @@ Insert KEY if there's no command."
32453243
9 29 (face lispy-face-req-nosel)
32463244
30 37 (face lispy-face-rst-nosel))))
32473245
(should (equal (lispy--pretty-args 'defun)
3248-
#("(defun name arglist docstring decl body...)"
3246+
#("(defun name arglist [docstring] [decl] [interactive] body...)"
32493247
1 6 (face lispy-face-hint)
32503248
7 11 (face lispy-face-req-nosel)
32513249
12 19 (face lispy-face-req-nosel)
3252-
20 29 (face lispy-face-opt-nosel)
3253-
30 34 (face lispy-face-opt-nosel)
3254-
35 42 (face lispy-face-rst-nosel))))
3250+
20 31 (face lispy-face-req-nosel)
3251+
32 38 (face lispy-face-req-nosel)
3252+
39 52 (face lispy-face-req-nosel)
3253+
53 60 (face lispy-face-rst-nosel))))
32553254
(should (equal (lispy--pretty-args 'defvar)
32563255
#("(defvar symbol initvalue docstring)"
32573256
1 7 (face lispy-face-hint)

0 commit comments

Comments
 (0)