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