Skip to content

Commit

Permalink
Added non-broad-word-char option tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-fiveisky committed Sep 25, 2023
1 parent a1e9cbc commit 1d2139a
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion extensions/vi-mode/tests/options.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@
(:import-from :lem-fake-interface
:with-fake-interface)
(:shadowing-import-from :lem-vi-mode/tests/utils
:with-current-buffer))
:with-current-buffer)
(:import-from :named-readtables
:in-readtable))
(in-package :lem-vi-mode/tests/options)

(in-readtable :interpol-syntax)

(deftest get-option
(ok (typep (get-option "number") 'option)
"Can get a global option")
Expand All @@ -24,3 +28,18 @@
(with-current-buffer (buf)
(ok (equalp (option-value "iskeyword") isk)
"Another buffer's local option is not changed"))))))

(deftest non-broad-word-char-option
(ok (typep (get-option "non-broad-word-char") 'option)
"Can get non-broad-word-char option")
(ok (typep (get-option "nbwc") 'option)
"Can get non-broad-word-char option by alias")
(with-fake-interface ()
(with-vi-buffer (#?"abc\n[(]def)\n")
(cmd "E")
(ok (buf= #?"abc\n(def[)]\n")))
(with-vi-buffer (#?"abc\n[(]def)\n")
(execute-set-command "nbwc+=(")
(execute-set-command "nbwc+=)")
(cmd "WE")
(ok (buf= #?"abc\n(de[f])\n")))))

0 comments on commit 1d2139a

Please sign in to comment.