emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Ilya Chernyshov <ichernyshovvv@gmail.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: [PATCH] testing: Delete duplicate tests
Date: Thu, 13 Jul 2023 09:51:33 +0000	[thread overview]
Message-ID: <87cz0wyw9m.fsf@localhost> (raw)
In-Reply-To: <87cz0xndem.fsf@gmail.com>

Ilya Chernyshov <ichernyshovvv@gmail.com> writes:

> In my last patch, I found a duplicate test, so I decided to find all of
> the duplicate tests inside testing/lisp/ folder via this function:

Thanks!

> --- a/testing/lisp/test-org-table.el
> +++ b/testing/lisp/test-org-table.el
> @@ -3368,10 +3368,6 @@ See also `test-org-table/copy-field'."
>  	  (org-test-with-temp-text "| 1 | 2 | 3 |"
>  	    (org-table-get-field 3 " foo ")
>  	    (buffer-string))))
> -  (should
> -   (equal " 4 "
> -	  (org-test-with-temp-text "| 1 | 2 |\n<point>| 3 | 4 |"
> -	    (org-table-get-field 2))))

It looks like the real test is supposed to be

(equal " foo "
...
(org-table-get-field 2 " foo ")
(buffer-string)

> --- a/testing/lisp/test-org.el
> +++ b/testing/lisp/test-org.el
> @@ -994,14 +994,6 @@
>  	      (org-auto-fill-function)
>  	      (buffer-string)))))
>    ;; Comment block: auto fill contents.
> -  (should
> -   (equal "#+BEGIN_COMMENT\n12345\n7890\n#+END_COMMENT"
> -	  (org-test-with-temp-text "#+BEGIN_COMMENT\n12345 7890\n#+END_COMMENT"
> -	    (let ((fill-column 5))
> -	      (forward-line)
> -	      (end-of-line)
> -	      (org-auto-fill-function)
> -	      (buffer-string)))))
>    (should
>     (equal "#+BEGIN_COMMENT\n12345\n7890\n#+END_COMMENT"
>  	  (org-test-with-temp-text "#+BEGIN_COMMENT\n12345 7890\n#+END_COMMENT"

And this is the result of 8a97c60
Do not fill verse blocks contents

* lisp/org.el (org-fill-context-prefix, org-fill-paragraph): Do not
  fill verse blocks contents.  Verse blocks can be used to format
  free-form poetry, so filling has to be done manually.
* testing/lisp/test-org.el: Remove unnecessary tests.

The test was changed from testing verse block into a duplicate.
I think the right thing to do here would be `should-not' + old version
of the test with VERSE block.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


  reply	other threads:[~2023-07-13  9:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-12 19:22 [PATCH] testing: Delete duplicate tests Ilya Chernyshov
2023-07-13  9:51 ` Ihor Radchenko [this message]
2023-08-08 12:44   ` Ihor Radchenko
2023-08-31  6:17     ` Ilya Chernyshov
2023-08-31  6:29       ` Ihor Radchenko
2023-11-08  9:59         ` Ihor Radchenko
2023-11-11  8:55           ` Ilya Chernyshov
2023-11-16 12:27             ` Ilya Chernyshov
2024-01-16 13:44             ` Ihor Radchenko
2024-01-23 12:03               ` Ilya Chernyshov
2024-01-26 13:24                 ` Ihor Radchenko
2024-01-27  5:04                   ` Ilya Chernyshov
2024-01-31 12:17                     ` Ihor Radchenko
2024-02-09 12:22                       ` Ilya Chernyshov
2024-02-09 14:11                         ` Ihor Radchenko
2023-07-14 11:50 ` Max Nikulin
2023-07-15  7:56   ` Ihor Radchenko

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=87cz0wyw9m.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=ichernyshovvv@gmail.com \
    /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).