[PATCH] D68472: [test] Depend on C.UTF-8 dependency for mri-utf8.test

Thomas Preud'homme via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 7 07:16:54 PDT 2019


thopre updated this revision to Diff 223591.
thopre marked an inline comment as done.
thopre added a comment.

Fix typo and add BOM


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68472/new/

https://reviews.llvm.org/D68472

Files:
  llvm/test/tools/llvm-ar/mri-nonascii.test
  llvm/test/tools/llvm-ar/mri-utf8.test


Index: llvm/test/tools/llvm-ar/mri-utf8.test
===================================================================
--- llvm/test/tools/llvm-ar/mri-utf8.test
+++ /dev/null
@@ -1,23 +0,0 @@
-# Test non-ascii archive members
-# XFAIL: system-darwin
-
-RUN: rm -rf %t && mkdir -p %t/extracted
-
-RUN: echo "contents" > %t/£.txt
-
-RUN: echo "CREATE %t/mri.ar" > %t/script.mri
-RUN: echo "ADDMOD %t/£.txt" >> %t/script.mri
-RUN: echo "SAVE" >> %t/script.mri
-
-RUN: llvm-ar -M < %t/script.mri
-RUN: cd %t/extracted && llvm-ar x %t/mri.ar
-
-# This works around problems launching processess that
-# include arguments with non-ascii characters.
-# Python on Linux defaults to ASCII encoding unless the
-# environment specifies otherwise, so it is explicitly set.
-# The reliance the test has on this locale is not ideal,
-# however alternate solutions have been difficult due to 
-# behaviour differences with python 2 vs python 3,
-# and linux vs windows.
-RUN: env LANG=en_US.UTF-8 %python -c "assert open(u'\U000000A3.txt', 'rb').read() == b'contents\n'"
Index: llvm/test/tools/llvm-ar/mri-nonascii.test
===================================================================
--- /dev/null
+++ llvm/test/tools/llvm-ar/mri-nonascii.test
@@ -0,0 +1,19 @@
+# Test non-ascii archive members
+# XFAIL: system-darwin
+
+RUN: rm -rf %t && mkdir -p %t/extracted
+
+RUN: echo "contents" > %t/£.txt
+
+RUN: echo "CREATE %t/mri.ar" > %t/script.mri
+RUN: echo "ADDMOD %t/£.txt" >> %t/script.mri
+RUN: echo "SAVE" >> %t/script.mri
+
+RUN: llvm-ar -M < %t/script.mri
+RUN: cd %t/extracted && llvm-ar x %t/mri.ar
+
+# Use input redirection to work around problems launching processes that
+# include arguments with non-ascii characters.
+RUN: FileCheck --strict-whitespace %s <£.txt
+CHECK:{{^}}
+CHECK-SAME:{{^}}contents{{$}}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68472.223591.patch
Type: text/x-patch
Size: 1811 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191007/4b2df1c9/attachment.bin>


More information about the llvm-commits mailing list