emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: hunglun o <hunglun.o@googlemail.com>
To: emacs-orgmode@gnu.org
Subject: test-org-colview.el: Fix an expected result in test-org-colview/columns-summary
Date: Tue, 13 Jun 2017 21:36:40 +0800	[thread overview]
Message-ID: <CADH0N4_opceFbMfR12x5f=x0OLCsFs_4AwO3kiXAyMJ_MfpBMQ@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 528 bytes --]

Hi,
some tests in test-org-colviews.el fail. If this patch is acceptable, I
will send more to fix the other failed test cases.

Let me know if I understand the test intent of this failed test case
correctly. Below is a summary from my patch:

* lisp/test-org-colview.el (test-org-colview/columns-summary): Fix 23rd
test case

This test sets 2014-03-04 to be current-time and then computes the
number of days between current-time and 2012-03-29. 705 days should be
expected. However, 705d 1h is given in the test case.


Thanks.

[-- Attachment #1.2: Type: text/html, Size: 703 bytes --]

[-- Attachment #2: 0001-test-org-colview.el-Fix-an-expected-result-in-test-o.patch --]
[-- Type: application/octet-stream, Size: 1100 bytes --]

From ea58796756f84a7c735d07598d785a365210f327 Mon Sep 17 00:00:00 2001
From: Hung Lun <hunglun.o@gmail.com>
Date: Tue, 13 Jun 2017 21:21:16 +0800
Subject: [PATCH] test-org-colview.el: Fix an expected result in
 test-org-colview/columns-summary

* lisp/test-org-colview.el (test-org-colview/columns-summary): Fix 23rd test case

This test sets 2014-03-04 to be current-time and then compute the
number of days between current-time and 2012-03-29. 705 days should be
expected. However, 705d 1h is given in the test case.

Modified from a patch proposal by O Hung Lun.

TINYCHANGE
---
 testing/lisp/test-org-colview.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testing/lisp/test-org-colview.el b/testing/lisp/test-org-colview.el
index f816e7b75..65f154530 100644
--- a/testing/lisp/test-org-colview.el
+++ b/testing/lisp/test-org-colview.el
@@ -528,7 +528,7 @@
 	(get-char-property (point) 'org-columns-value-modified)))))
   (should
    (equal
-    "705d 1h"
+    "705d"
     (cl-letf (((symbol-function 'current-time)
 	       (lambda ()
 		 (apply #'encode-time
-- 
2.12.2


             reply	other threads:[~2017-06-13 13:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-13 13:36 hunglun o [this message]
2017-06-14  9:42 ` test-org-colview.el: Fix an expected result in test-org-colview/columns-summary Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADH0N4_opceFbMfR12x5f=x0OLCsFs_4AwO3kiXAyMJ_MfpBMQ@mail.gmail.com' \
    --to=hunglun.o@googlemail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).