From 1d2139aedb338a4f40303db125269fafb208bb48 Mon Sep 17 00:00:00 2001 From: Ilia Kruglov Date: Sun, 24 Sep 2023 23:54:39 -0300 Subject: [PATCH] Added non-broad-word-char option tests. --- extensions/vi-mode/tests/options.lisp | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/extensions/vi-mode/tests/options.lisp b/extensions/vi-mode/tests/options.lisp index d4c0f5fa1..9683a80e8 100644 --- a/extensions/vi-mode/tests/options.lisp +++ b/extensions/vi-mode/tests/options.lisp @@ -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") @@ -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"))))) \ No newline at end of file