[llvm] [llvm-strings] Add --encoding={s,S,u} option (PR #221794)
Harald van Dijk via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 9 04:11:25 PDT 2026
================
@@ -0,0 +1,28 @@
+## Show that llvm-strings uses the specified encoding.
+
+RUN: echo a > %t
+RUN: echo ab >> %t
+RUN: echo abc >> %t
+RUN: echo abcd >> %t
+RUN: echo abcd€ >> %t
+
+# Check that long form options work.
+RUN: llvm-strings --encoding s 2>&1 %t | FileCheck --check-prefixes CHECK,CHECK-ASCII %s
+RUN: llvm-strings --encoding S 2>&1 %t | FileCheck %s
----------------
hvdijk wrote:
Thanks, this intentionally does not check whether the `€` is picked up as part of the string, because whether it is depends on the user's locale, but it should check that `abcd` is printed twice and I missed that.
https://github.com/llvm/llvm-project/pull/221794
More information about the llvm-commits
mailing list