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

* bug#30905: Add tests for buffer-base-buffer function
  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-04-11  7:17 ` Shanavas M
  1 sibling, 1 reply; 6+ messages in thread
From: Shanavas @ 2018-03-25 11:22 UTC (permalink / raw)
  To: 30905



On March 22, 2018 12:28:39 PM GMT+03:00, Shanavas M <snavas@disroot.org> wrote:
>This patch adds two tests for buffer-base-buffer function
>
>
>--
>
>Shanavas M

This is my first contribution to emacs. Is this patch ready to go or Am I missing something??
-- 
Shanavas M





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

* bug#30905: Add tests for buffer-base-buffer function
  2018-03-25 11:22 ` Shanavas
@ 2018-03-25 11:42   ` Noam Postavsky
  2018-03-28  9:41     ` Shanavas M
  0 siblings, 1 reply; 6+ messages in thread
From: Noam Postavsky @ 2018-03-25 11:42 UTC (permalink / raw)
  To: Shanavas; +Cc: 30905

severity 30905 wishlist
quit

Shanavas <snavas@disroot.org> writes:
>
> This is my first contribution to emacs. Is this patch ready to go or Am I missing something??

A couple of things.

Have assigned copyright for Emacs? (the change is small enough to
install regardless, but note that we only accept up to 15 lines worth of
unassigned code per person).

> Subject: [PATCH] Add tests for buffer-base-buffer function
>
> ---

You should add a ChangeLog style entry to the commit message, as
described in CONTRIBUTE.
  
> +(ert-deftest test-buffer-base-buffer-indirect ()
> +  (let* ((base (get-buffer-create "base")

You should rather use with-temp-buffer, so that the test will not
interfere with anything else (same for the second test).





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

* bug#30905: Add tests for buffer-base-buffer function
  2018-03-25 11:42   ` Noam Postavsky
@ 2018-03-28  9:41     ` Shanavas M
  2018-04-12  1:19       ` Noam Postavsky
  0 siblings, 1 reply; 6+ messages in thread
From: Shanavas M @ 2018-03-28  9:41 UTC (permalink / raw)
  To: 30905

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

On Sunday 25 March 2018 02:42 PM, Noam Postavsky wrote:

> A couple of things.
>
> Have assigned copyright for Emacs? (the change is small enough to
> install regardless, but note that we only accept up to 15 lines worth of
> unassigned code per person).
I have send the request. Waiting for reply.
> You should add a ChangeLog style entry to the commit message, as
> described in CONTRIBUTE.
Updated
>    
>> +(ert-deftest test-buffer-base-buffer-indirect ()
>> +  (let* ((base (get-buffer-create "base")
> You should rather use with-temp-buffer, so that the test will not
> interfere with anything else (same for the second test).
>
Updated.
>

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

From c1627cb453a6aceba36305417d5ac6b1e63e7021 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 (test-buffer-base-buffer-indirect)
  (test-buffer-base-buffer-non-indirect): Add tests for
  `buffer-base-buffer'
---
 test/src/buffer-tests.el | 10 ++++++++++
 1 file changed, 10 insertions(+)

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


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

* bug#30905: Add tests for buffer-base-buffer function
  2018-03-22  9:28 bug#30905: Add tests for buffer-base-buffer function Shanavas M
  2018-03-25 11:22 ` Shanavas
@ 2018-04-11  7:17 ` Shanavas M
  1 sibling, 0 replies; 6+ messages in thread
From: Shanavas M @ 2018-04-11  7:17 UTC (permalink / raw)
  To: 30905

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

I have completed the copyright assignment.

Hope this patch is ready to go.
-- 
Shanavas M

[-- Attachment #2: Type: text/html, Size: 110 bytes --]

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

* bug#30905: Add tests for buffer-base-buffer function
  2018-03-28  9:41     ` Shanavas M
@ 2018-04-12  1:19       ` Noam Postavsky
  0 siblings, 0 replies; 6+ messages in thread
From: Noam Postavsky @ 2018-04-12  1:19 UTC (permalink / raw)
  To: Shanavas M; +Cc: 30905

tags 30905 fixed
close 30905 27.1
quit

Shanavas M <shanavas@disroot.org> writes:

>>From c1627cb453a6aceba36305417d5ac6b1e63e7021 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

Pushed to master.

[1: 10f5f4361b]: 2018-04-11 21:16:49 -0400
  Add tests for buffer-base-buffer function (Bug#30905)
  https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=10f5f4361b9783f1cc4a683cca31ab3192fe179d





^ permalink raw reply	[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).