1*c87b03e5Sespie /* Copyright (C) 2002 Free Software Foundation, Inc.  */
2*c87b03e5Sespie 
3*c87b03e5Sespie /* { dg-do preprocess } */
4*c87b03e5Sespie /* { dg-options "-dN -M" } */
5*c87b03e5Sespie 
6*c87b03e5Sespie /* Test -dN -M does not fail.  It should print just
7*c87b03e5Sespie    the Makefile rule with dependencies.  */
8*c87b03e5Sespie 
9*c87b03e5Sespie #define foo bar
10*c87b03e5Sespie #define funlike(like) fun like
11*c87b03e5Sespie int variable;
12*c87b03e5Sespie 
13*c87b03e5Sespie /* { dg-final { if ![file exists cmdlne-dN-M.i] { return }                } }
14*c87b03e5Sespie    { dg-final { if { [grep cmdlne-dN-M.i "^#define foo"] != "" } { fail "cmdlne-dN-M.c: #define line printed" } } }
15*c87b03e5Sespie    { dg-final { if { [grep cmdlne-dN-M.i "variable"] != "" } { fail "cmdlne-dN-M.c: non-#define line printed" } } }
16*c87b03e5Sespie    { dg-final { if { [grep cmdlne-dN-M.i "^cmdlne-dN-M.*:.*cmdlne-dN-M.c"] == "" } { xfail "cmdlne-dN-M.c: dependency rule not printed" } } }
17*c87b03e5Sespie    { dg-final { return } }  */
18