unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#30905: Add tests for buffer-base-buffer function
@ 2018-03-22  9:28 Shanavas M
  2018-03-25 11:22 ` Shanavas
  2018-04-11  7:17 ` Shanavas M
  0 siblings, 2 replies; 6+ messages in thread
From: Shanavas M @ 2018-03-22  9:28 UTC (permalink / raw)
  To: 30905

[-- Attachment #1: Type: text/plain, Size: 76 bytes --]

This patch adds two tests for buffer-base-buffer function


--

Shanavas M


[-- Attachment #2: Add-tests-for-buffer-base-buffer-function.patch --]
[-- Type: text/x-patch, Size: 1007 bytes --]

From a8db56897545f6414f180a35d51ea8e17e15d525 Mon Sep 17 00:00:00 2001
From: Shanavas M <shanavas@disroot.org>
Date: Thu, 22 Mar 2018 12:20:22 +0300
Subject: [PATCH] Add tests for buffer-base-buffer function

---
 test/src/buffer-tests.el | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/test/src/buffer-tests.el b/test/src/buffer-tests.el
index f9c477fbfd..170e3a5656 100644
--- a/test/src/buffer-tests.el
+++ b/test/src/buffer-tests.el
@@ -50,4 +50,13 @@
                             (progn (get-buffer-create "nil")
                                    (generate-new-buffer-name "nil")))))
 
+(ert-deftest test-buffer-base-buffer-indirect ()
+  (let* ((base (get-buffer-create "base")
+          (ind-buf (make-indirect-buffer base "indbuf"))))
+    (should (eq (buffer-base-buffer ind-buf) base))))
+
+(ert-deftest test-buffer-base-buffer-non-indirect ()
+  (let ((buf (get-buffer-create "buf")))
+    (should (eq (buffer-base-buffer buf) nil))))
+
 ;;; buffer-tests.el ends here
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-04-12  1:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-22  9:28 bug#30905: Add tests for buffer-base-buffer function Shanavas M
2018-03-25 11:22 ` Shanavas
2018-03-25 11:42   ` Noam Postavsky
2018-03-28  9:41     ` Shanavas M
2018-04-12  1:19       ` Noam Postavsky
2018-04-11  7:17 ` Shanavas M

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).