Subject: bug#11339: 24.1.50; read-{buffer,file-name}-completion-ignore-case fails on non-ascii

From: Stefan Monnier <[email-masked]>
Date: Fri, 08 Nov 2019 17:36:08 -0500

> The patch below fixes Stefan's simplified test case, but the original
> problem is still unsolved: "C-x b ba TAB TAB" says "Sole completion".
>
> What did I miss?

It still fails when you swap the two elements in the list :-(
I don't have time to dig into the code now, tho,

        Stefan

(ert-deftest try-completion-ignore-case ()
  (let ((completion-ignore-case t))
    (should (equal (try-completion "bar" '("bAr" "barfoo")) "bAr"))
    (should (equal (try-completion "bar" '("bArfoo" "barbaz")) "bar"))
    (should (equal (try-completion "bar" '("bArfoo" "barbaz"))
                   (try-completion "bar" '("barbaz" "bArfoo"))))
    ;; bug#11339
    (should (equal (try-completion "baz" '("baz" "bAz")) "baz")) ;And not `t'!
    (should (equal (try-completion "baz" '("bAz" "baz"))
                   (try-completion "baz" '("baz" "bAz"))))))