emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Patch] tests for org-remove-invisible


From: Maxim Nikulin
Subject: [Patch] tests for org-remove-invisible
Date: Fri, 21 May 2021 00:06:01 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

The main patch that fixes org-remove-invisible to improve list sorting is 
landed.

Let me remind that there were patches that added more test cases:
https://orgmode.org/list/s5p88r$go9$1@ciao.gmane.io
Is there any interest in them?

In the following subthread Nicolas mentioned that some of them could fail
https://orgmode.org/list/87r1j6b6ku.fsf@nicolasgoaziou.fr
I do not see any reason for failure. I just have tried C.UTF-8, en_US.UTF-8,
es_ES.UTF-8, and ru_RU.UTF-8 locales (interactively) and do not see any
problem. This set of locales has 3 different collation rules,
however I do not think it matters for tests.

On 20/04/2021 19:37, Maxim Nikulin wrote:
> On 20/04/2021 00:50, Nicolas Goaziou wrote:
>> Maxim Nikulin writes:
>>
>>> On 19/04/2021 23:08, Nicolas Goaziou wrote:
>>>>> +      ;; Space role in sorting.
>>>>> +      ;; Test would fail for locales with ignored space, e.g. en_US, it 
>>>>> works
>>>>> +      ;; in C and currently rare locales having significant space 
>>>>> (es_ES, pl_PL)
>>>>> +      (should
>>>>> +       (equal "- Time stamp\n- Timer\n"
>>>>> +              (org-test-with-temp-text "- Timer\n- Time stamp\n"
>>>>> +                (org-sort-list t ?a)
>>>>> +                (buffer-string))))))
>>>> Since this test is bound to fail for some developers, I assume it
>>>> shouldn't be included.
>>>
>>> Locale "C" is forced for this group of tests.
>>
>> Sorry, I don't understand. There is no locale change around this test,
>> so it will fail, for example, for me. I wouldn't want to get a noisy
>> failure each time I run tests.
> 
> Certainly flaky tests must be avoided. However I can not identify the source 
> of confusion (yours or mine).
> 
> There is redefinition of `string-collate-lessp' to run tests with "C" locale:
> https://code.orgmode.org/bzg/org-mode/src/master/testing/lisp/test-org-list.el#L1207
> 
> And it works for me




reply via email to

[Prev in Thread] Current Thread [Next in Thread]