1 ## Show that llvm-strings can handle the -t/--radix switch properly.
3 RUN: split-file --no-leading-lines %s %t
17 RUN: llvm-strings %t/a.txt | FileCheck %s -check-prefix CHECK-NONE --implicit-check-not={{.}}
18 RUN: llvm-strings -t d %t/a.txt | FileCheck %s -check-prefix CHECK-DEC --strict-whitespace --implicit-check-not={{.}}
19 RUN: llvm-strings -t o %t/a.txt | FileCheck %s -check-prefix CHECK-OCT --strict-whitespace --implicit-check-not={{.}}
20 RUN: llvm-strings -t x %t/a.txt | FileCheck %s -check-prefix CHECK-HEX --strict-whitespace --implicit-check-not={{.}}
22 ## Show --radix works too.
23 RUN: llvm-strings --radix d %t/a.txt | FileCheck %s -check-prefix CHECK-DEC --strict-whitespace
24 RUN: llvm-strings --radix o %t/a.txt | FileCheck %s -check-prefix CHECK-OCT --strict-whitespace
25 RUN: llvm-strings --radix x %t/a.txt | FileCheck %s -check-prefix CHECK-HEX --strict-whitespace
27 ## Show different syntaxes work.
28 RUN: llvm-strings --radix=d %t/a.txt | FileCheck %s -check-prefix CHECK-DEC --strict-whitespace
29 RUN: llvm-strings -t d %t/a.txt | FileCheck %s -check-prefix CHECK-DEC --strict-whitespace
31 CHECK-NONE: {{^}}three
34 CHECK-NONE: {{^}}seven
35 CHECK-NONE: {{^}}eight
38 CHECK-DEC: {{^}} 8 three
39 CHECK-DEC: {{^}} 14 four
40 CHECK-DEC: {{^}} 19 five
41 CHECK-DEC: {{^}} 28 seven
42 CHECK-DEC: {{^}} 34 eight
43 CHECK-DEC: {{^}} 40 nine
45 CHECK-OCT: {{^}} 10 three
46 CHECK-OCT: {{^}} 16 four
47 CHECK-OCT: {{^}} 23 five
48 CHECK-OCT: {{^}} 34 seven
49 CHECK-OCT: {{^}} 42 eight
50 CHECK-OCT: {{^}} 50 nine
52 CHECK-HEX: {{^}} 8 three
53 CHECK-HEX: {{^}} e four
54 CHECK-HEX: {{^}} 13 five
55 CHECK-HEX: {{^}} 1c seven
56 CHECK-HEX: {{^}} 22 eight
57 CHECK-HEX: {{^}} 28 nine
59 ## Show that an invalid value is rejected.
60 RUN: not llvm-strings --radix z %t/a.txt 2>&1 | FileCheck %s --check-prefix=INVALID
61 INVALID: error: --radix value should be one of: '' (no offset), 'o' (octal), 'd' (decimal), 'x' (hexadecimal)