1*f4a2713aSLionel Sambuc // Test -MT and -E flags, PR4063 2*f4a2713aSLionel Sambuc 3*f4a2713aSLionel Sambuc // RUN: %clang -E -o %t.1 %s 4*f4a2713aSLionel Sambuc // RUN: %clang -E -MD -MF %t.d -MT foo -o %t.2 %s 5*f4a2713aSLionel Sambuc // RUN: diff %t.1 %t.2 6*f4a2713aSLionel Sambuc // RUN: FileCheck -check-prefix=TEST1 %s < %t.d 7*f4a2713aSLionel Sambuc // TEST1: foo: 8*f4a2713aSLionel Sambuc // TEST1: dependencies-and-pp.c 9*f4a2713aSLionel Sambuc 10*f4a2713aSLionel Sambuc // Test -MQ flag without quoting 11*f4a2713aSLionel Sambuc 12*f4a2713aSLionel Sambuc // RUN: %clang -E -MD -MF %t.d -MQ foo -o %t %s 13*f4a2713aSLionel Sambuc // RUN: FileCheck -check-prefix=TEST2 %s < %t.d 14*f4a2713aSLionel Sambuc // TEST2: foo: 15*f4a2713aSLionel Sambuc 16*f4a2713aSLionel Sambuc // Test -MQ flag with quoting 17*f4a2713aSLionel Sambuc 18*f4a2713aSLionel Sambuc // RUN: %clang -E -MD -MF %t.d -MQ '$fo\ooo ooo\ ooo\\ ooo#oo' -o %t %s 19*f4a2713aSLionel Sambuc // RUN: FileCheck -check-prefix=TEST3 %s < %t.d 20*f4a2713aSLionel Sambuc // TEST3: $$fo\ooo\ ooo\\\ ooo\\\\\ ooo\#oo: 21*f4a2713aSLionel Sambuc 22*f4a2713aSLionel Sambuc // Test consecutive -MT flags 23*f4a2713aSLionel Sambuc 24*f4a2713aSLionel Sambuc // RUN: %clang -E -MD -MF %t.d -MT foo -MT bar -MT baz -o %t %s 25*f4a2713aSLionel Sambuc // RUN: diff %t.1 %t 26*f4a2713aSLionel Sambuc // RUN: FileCheck -check-prefix=TEST4 %s < %t.d 27*f4a2713aSLionel Sambuc // TEST4: foo bar baz: 28*f4a2713aSLionel Sambuc 29*f4a2713aSLionel Sambuc // Test consecutive -MT and -MQ flags 30*f4a2713aSLionel Sambuc 31*f4a2713aSLionel Sambuc // RUN: %clang -E -MD -MF %t.d -MT foo -MQ '$(bar)' -MT 'b az' -MQ 'qu ux' -MQ ' space' -o %t %s 32*f4a2713aSLionel Sambuc // RUN: FileCheck -check-prefix=TEST5 %s < %t.d 33*f4a2713aSLionel Sambuc // TEST5: foo $$(bar) b az qu\ ux \ space: 34*f4a2713aSLionel Sambuc 35*f4a2713aSLionel Sambuc // TODO: Test default target without quoting 36*f4a2713aSLionel Sambuc // TODO: Test default target with quoting 37