blob: ca3a7f44fd8eaa29f8da25cadb31b589c1d5e0b8 [file] [log] [blame]
Daniel Dunbar80737ad2009-12-15 22:01:24 +00001// RUN: %clang -ccc-print-options input -Yunknown -m32 -arch ppc -djoined -A separate -Ajoined -Wp,one,two -Xarch_joined AndSeparate -sectalign 1 2 3 2> %t
Daniel Dunbar8477ee92009-12-04 21:55:23 +00002// RUN: grep 'Option 0 - Name: "-ccc-print-options", Values: {}' %t
3// RUN: grep 'Option 1 - Name: "<input>", Values: {"input"}' %t
4// RUN: grep 'Option 2 - Name: "<unknown>", Values: {"-Yunknown"}' %t
5// RUN: grep 'Option 3 - Name: "-m32", Values: {}' %t
6// RUN: grep 'Option 4 - Name: "-arch", Values: {"ppc"}' %t
7// RUN: grep 'Option 5 - Name: "-d", Values: {"joined"}' %t
8// RUN: grep 'Option 6 - Name: "-A", Values: {"separate"}' %t
9// RUN: grep 'Option 7 - Name: "-A", Values: {"joined"}' %t
10// RUN: grep 'Option 8 - Name: "-Wp,", Values: {"one", "two"}' %t
11// RUN: grep 'Option 9 - Name: "-Xarch_", Values: {"joined", "AndSeparate"}' %t
12// RUN: grep 'Option 10 - Name: "-sectalign", Values: {"1", "2", "3"}' %t
Daniel Dunbarec29d362009-03-18 01:48:37 +000013
Daniel Dunbar80737ad2009-12-15 22:01:24 +000014// RUN: not %clang -V 2> %t
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000015// RUN: grep "error: argument to '-V' is missing (expected 1 value)" %t
Daniel Dunbar80737ad2009-12-15 22:01:24 +000016// RUN: not %clang -sectalign 1 2 2> %t
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000017// RUN: grep "error: argument to '-sectalign' is missing (expected 3 values)" %t
Daniel Dunbarb0c4df52009-03-22 23:26:43 +000018
Daniel Dunbar4ae24e72009-04-07 18:21:47 +000019// Verify that search continues after find the first option.
Daniel Dunbar80737ad2009-12-15 22:01:24 +000020// RUN: %clang -ccc-print-options -Wally 2> %t
Daniel Dunbar8477ee92009-12-04 21:55:23 +000021// RUN: grep 'Option 0 - Name: "-ccc-print-options", Values: {}' %t
22// RUN: grep 'Option 1 - Name: "-W", Values: {"ally"}' %t
Daniel Dunbar4ae24e72009-04-07 18:21:47 +000023
Daniel Dunbarec29d362009-03-18 01:48:37 +000024
25