[all-commits] [llvm/llvm-project] 17608d: [libcxx][pretty printers] Correct locale for u16/u...

David Spickett via All-commits all-commits at lists.llvm.org
Thu Oct 7 01:26:40 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 17608d345f69af8e2c7aefcf7952aba2ffc38c0e
      https://github.com/llvm/llvm-project/commit/17608d345f69af8e2c7aefcf7952aba2ffc38c0e
  Author: David Spickett <david.spickett at linaro.org>
  Date:   2021-10-07 (Thu, 07 Oct 2021)

  Changed paths:
    M libcxx/test/libcxx/gdb/gdb_pretty_printer_test.sh.cpp

  Log Message:
  -----------
  [libcxx][pretty printers] Correct locale for u16/u32 string tests

When the locale is not some UTF-8 these tests fail.
(different results for python2 linked gdbs vs. python3
but same issue)

Setting the locale just for the test works around this.
By default Ubuntu comes with just C.UTF-8. I've chosen
to use en_US.UTF-8 instead given that my Mac doesn't have
the former and there's a slim chance this test might run there.

This also enables the u16string tests which are now passing.

Reviewed By: #libc, ldionne, saugustine

Differential Revision: https://reviews.llvm.org/D111138




More information about the All-commits mailing list