Morgan Smith <[email protected]> writes:

> Tests do not pass on Emacs 28 because Ihor used `string-equal-ignore-case' in
> the latest commits.

Fixed
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=99ee1bcd6

> Found your problem.  Seems you're running the test suite with
> TZ="Europe/Istanbul".  I've decided we should hardcode all the tests to run on
> Nepal time (UTC +5:45, TZ="Asia/Kathmandu") so we don't have any more issues.
> Just kidding!
>
> Although that joke has exposed the fact that
> `test-ox-icalendar/todo-repeater-until-utc' does not pass on Nepal time.  Well
> I can't unsee that so I'll add that to my todo list.  As a Canadian I should
> probably check Newfoundland (UTC -3:30 + DST).
>
> I will admit I'm a little annoyed that I ran the test suite on 4 emacs across
> two timezones and still wasn't able to anticipate a test failure on your side.
> So many variables to account for.

Time zones are crazy indeed. There are many more bugs in this area.
There are also locales...

> Although personally I'm a fan of tests that show exactly what behavior the
> software does, even if it's wrong.  If the behavior starts being wrong in a
> different way I'd like to know and the ":expected-result :failed" won't
> tell me.

Because not every single aspect of Org behavior is documented, tests are
sometimes used as kind of reference about how the code *should*
behave. So, having a test for something implies that one or other
behavior (even if awkward) is intentional. In some cases, Org mode's
behavior is weird only on a first glance. However, that behavior may be
thoughtfully discussed on the mailing list in the past and then codified
in the tests. Having tests that simply test for knowingly erroneous
behavior will break such assumptions.

> That being said, I did just realize that grepping the
> code for "todo" items is not very easy.  Should I be using "XXX" comments
> instead?

We use FIXME. It is more greppable in Org's context.
See https://orgmode.org/worg/org-maintenance.html#minor-major-releases

> +(ert-deftest test-org-habit/org-extend-today-until ()
> +  "Test habit graph with `org-extend-today-until' set."
> +  :expected-result :failed
> ...
> +              ;; TODO: actual result is
> +              ;; (t "\nhabit   * *     \n")
> +              (1 "\nhabit  ** !   \n")

Is this todo still relevant?

> +           (dolist (test-time '(2009-10-15
> +                                2009-10-16
> ...
> +             (let ((expected-output-string
> +                    (cl-case test-time
> +                      (2009-10-15
> +                       " *   *  * *     * *  *       \n")
> +                      (2009-10-16
> +                       "*   *  * *     * *  *!       \n")
> ...

I believe that you can simplify this by using an alist
'((2009-10-15 . "...")
  (2009-10-16 . "...) ...)

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
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 via email to