1## Show that llvm-strings can handle the -t/--radix switch properly. 2 3RUN: split-file --no-leading-lines %s %t 4#--- a.txt 5one 6two 7three 8four 9five 10six 11seven 12eight 13nine 14ten 15#--- end 16 17RUN: llvm-strings %t/a.txt | FileCheck %s -check-prefix CHECK-NONE --implicit-check-not={{.}} 18RUN: llvm-strings -t d %t/a.txt | FileCheck %s -check-prefix CHECK-DEC --strict-whitespace --implicit-check-not={{.}} 19RUN: llvm-strings -t o %t/a.txt | FileCheck %s -check-prefix CHECK-OCT --strict-whitespace --implicit-check-not={{.}} 20RUN: llvm-strings -t x %t/a.txt | FileCheck %s -check-prefix CHECK-HEX --strict-whitespace --implicit-check-not={{.}} 21 22## Show --radix works too. 23RUN: llvm-strings --radix d %t/a.txt | FileCheck %s -check-prefix CHECK-DEC --strict-whitespace 24RUN: llvm-strings --radix o %t/a.txt | FileCheck %s -check-prefix CHECK-OCT --strict-whitespace 25RUN: llvm-strings --radix x %t/a.txt | FileCheck %s -check-prefix CHECK-HEX --strict-whitespace 26 27## Show different syntaxes work. 28RUN: llvm-strings --radix=d %t/a.txt | FileCheck %s -check-prefix CHECK-DEC --strict-whitespace 29RUN: llvm-strings -t=d %t/a.txt | FileCheck %s -check-prefix CHECK-DEC --strict-whitespace 30 31CHECK-NONE: {{^}}three 32CHECK-NONE: {{^}}four 33CHECK-NONE: {{^}}five 34CHECK-NONE: {{^}}seven 35CHECK-NONE: {{^}}eight 36CHECK-NONE: {{^}}nine 37 38CHECK-DEC: {{^}} 8 three 39CHECK-DEC: {{^}} 14 four 40CHECK-DEC: {{^}} 19 five 41CHECK-DEC: {{^}} 28 seven 42CHECK-DEC: {{^}} 34 eight 43CHECK-DEC: {{^}} 40 nine 44 45CHECK-OCT: {{^}} 10 three 46CHECK-OCT: {{^}} 16 four 47CHECK-OCT: {{^}} 23 five 48CHECK-OCT: {{^}} 34 seven 49CHECK-OCT: {{^}} 42 eight 50CHECK-OCT: {{^}} 50 nine 51 52CHECK-HEX: {{^}} 8 three 53CHECK-HEX: {{^}} e four 54CHECK-HEX: {{^}} 13 five 55CHECK-HEX: {{^}} 1c seven 56CHECK-HEX: {{^}} 22 eight 57CHECK-HEX: {{^}} 28 nine 58 59## Show that an invalid value is rejected. 60RUN: not llvm-strings --radix z %t/a.txt 2>&1 | FileCheck %s --check-prefix=INVALID 61INVALID: llvm-strings{{.*}}: for the --radix option: Cannot find option named 'z'! 62