aboutsummaryrefslogtreecommitdiff
path: root/compat-tests.el
diff options
context:
space:
mode:
Diffstat (limited to 'compat-tests.el')
-rw-r--r--compat-tests.el14
1 files changed, 14 insertions, 0 deletions
diff --git a/compat-tests.el b/compat-tests.el
index b9e5a0b..9ff6425 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -2648,5 +2648,19 @@
(require 'dired)
(should-error (compat-call dired-get-marked-files nil nil nil nil t)))
+(ert-deftest use-region ()
+ (with-temp-buffer
+ (insert "abc\ndef\n")
+ (set-mark 2)
+ (goto-char 7)
+ (transient-mark-mode)
+ (should (use-region-p))
+ (should-equal 2 (use-region-beginning))
+ (should-equal 7 (use-region-end))))
+
+(ert-deftest get-scratch-buffer-create ()
+ (should-equal "*scratch*" (buffer-name (get-scratch-buffer-create)))
+ (should-equal initial-major-mode (buffer-local-value 'major-mode (get-scratch-buffer-create))))
+
(provide 'compat-tests)
;;; compat-tests.el ends here