Daniel Dunbar | 80737ad | 2009-12-15 22:01:24 +0000 | [diff] [blame] | 1 | // 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 Dunbar | 8477ee9 | 2009-12-04 21:55:23 +0000 | [diff] [blame] | 2 | // 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 Dunbar | ec29d36 | 2009-03-18 01:48:37 +0000 | [diff] [blame] | 13 | |
Daniel Dunbar | 80737ad | 2009-12-15 22:01:24 +0000 | [diff] [blame] | 14 | // RUN: not %clang -V 2> %t |
Daniel Dunbar | 4fcfde4 | 2009-11-08 01:45:36 +0000 | [diff] [blame] | 15 | // RUN: grep "error: argument to '-V' is missing (expected 1 value)" %t |
Daniel Dunbar | 80737ad | 2009-12-15 22:01:24 +0000 | [diff] [blame] | 16 | // RUN: not %clang -sectalign 1 2 2> %t |
Daniel Dunbar | 4fcfde4 | 2009-11-08 01:45:36 +0000 | [diff] [blame] | 17 | // RUN: grep "error: argument to '-sectalign' is missing (expected 3 values)" %t |
Daniel Dunbar | b0c4df5 | 2009-03-22 23:26:43 +0000 | [diff] [blame] | 18 | |
Daniel Dunbar | 4ae24e7 | 2009-04-07 18:21:47 +0000 | [diff] [blame] | 19 | // Verify that search continues after find the first option. |
Daniel Dunbar | 80737ad | 2009-12-15 22:01:24 +0000 | [diff] [blame] | 20 | // RUN: %clang -ccc-print-options -Wally 2> %t |
Daniel Dunbar | 8477ee9 | 2009-12-04 21:55:23 +0000 | [diff] [blame] | 21 | // RUN: grep 'Option 0 - Name: "-ccc-print-options", Values: {}' %t |
| 22 | // RUN: grep 'Option 1 - Name: "-W", Values: {"ally"}' %t |
Daniel Dunbar | 4ae24e7 | 2009-04-07 18:21:47 +0000 | [diff] [blame] | 23 | |
Daniel Dunbar | ec29d36 | 2009-03-18 01:48:37 +0000 | [diff] [blame] | 24 | |
| 25 | |