aboutsummaryrefslogtreecommitdiffstats
path: root/test/src
diff options
context:
space:
mode:
authorMattias EngdegÄrd2025-07-29 16:29:43 +0200
committerMattias EngdegÄrd2025-07-30 11:04:11 +0200
commit2d18878b962e3591fe5052ede88e520f9b861dda (patch)
treea6e6ce1dbf506ab3bdffaec3038088901d3057d5 /test/src
parent5a9cbf24ec94fc1134905db77d754f064efc7726 (diff)
downloademacs-2d18878b962e3591fe5052ede88e520f9b861dda.tar.gz
emacs-2d18878b962e3591fe5052ede88e520f9b861dda.zip
Move keyboard input functions from lread.c to keyboard.c
These have nothing to do with the Lisp reader at all. Suggested by Lynn Winebarger (bug#79035). * src/lread.c (read_filtered_event, Fread_char, Fread_event) (Fread_char_exclusive, Qascii_character): Move... * src/keyboard.c: ...here. * test/src/lread-tests.el (test-inhibit-interaction): Move... * test/src/keyboard-tests.el (keyboard-inhibit-interaction): ...here.
Diffstat (limited to 'test/src')
-rw-r--r--test/src/keyboard-tests.el6
-rw-r--r--test/src/lread-tests.el6
2 files changed, 6 insertions, 6 deletions
diff --git a/test/src/keyboard-tests.el b/test/src/keyboard-tests.el
index 05c35340149..3a36446ac83 100644
--- a/test/src/keyboard-tests.el
+++ b/test/src/keyboard-tests.el
@@ -75,5 +75,11 @@
75;; (recursive-edit) 75;; (recursive-edit)
76;; (should (equal msgs '("C-u 55-" "C-u 5-" "C-u-")))))) 76;; (should (equal msgs '("C-u 55-" "C-u 5-" "C-u-"))))))
77 77
78(ert-deftest keyboard-inhibit-interaction ()
79 (let ((inhibit-interaction t))
80 (should-error (read-char "foo: "))
81 (should-error (read-event "foo: "))
82 (should-error (read-char-exclusive "foo: "))))
83
78(provide 'keyboard-tests) 84(provide 'keyboard-tests)
79;;; keyboard-tests.el ends here 85;;; keyboard-tests.el ends here
diff --git a/test/src/lread-tests.el b/test/src/lread-tests.el
index 421c0c0ed4a..4dc8938b973 100644
--- a/test/src/lread-tests.el
+++ b/test/src/lread-tests.el
@@ -222,12 +222,6 @@ literals (Bug#20852)."
222(ert-deftest lread-circular-hash () 222(ert-deftest lread-circular-hash ()
223 (should-error (read "#s(hash-table data #0=(#0# . #0#))"))) 223 (should-error (read "#s(hash-table data #0=(#0# . #0#))")))
224 224
225(ert-deftest test-inhibit-interaction ()
226 (let ((inhibit-interaction t))
227 (should-error (read-char "foo: "))
228 (should-error (read-event "foo: "))
229 (should-error (read-char-exclusive "foo: "))))
230
231(ert-deftest lread-float () 225(ert-deftest lread-float ()
232 (should (equal (read "13") 13)) 226 (should (equal (read "13") 13))
233 (should (equal (read "+13") 13)) 227 (should (equal (read "+13") 13))