diff options
author | Neil Booth <neilb@earthling.net> | 2000-07-04 11:51:43 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2000-07-04 11:51:43 +0000 |
commit | d2c1325af0ee17d224af50909f0dbcc70526b98d (patch) | |
tree | b64734073889e8832a72e9662d6c7a142879f5fe /gcc/testsuite/gcc.dg/cpp/strify2.c | |
parent | 0a336522af17ebf153c8e3cd993dcc399714a5d8 (diff) | |
download | gcc-d2c1325af0ee17d224af50909f0dbcc70526b98d.zip gcc-d2c1325af0ee17d224af50909f0dbcc70526b98d.tar.gz gcc-d2c1325af0ee17d224af50909f0dbcc70526b98d.tar.bz2 |
macro1.c: Add more macro expansion tests.
* gcc.dg/cpp/macro1.c: Add more macro expansion tests.
* gcc.dg/cpp/strify2.c: Same.
From-SVN: r34867
Diffstat (limited to 'gcc/testsuite/gcc.dg/cpp/strify2.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/strify2.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/testsuite/gcc.dg/cpp/strify2.c b/gcc/testsuite/gcc.dg/cpp/strify2.c index ddde976..18777bd 100644 --- a/gcc/testsuite/gcc.dg/cpp/strify2.c +++ b/gcc/testsuite/gcc.dg/cpp/strify2.c @@ -16,8 +16,9 @@ extern void abort (void); int main (int argc, char *argv[]) { - str (\); /* { dg-warning "valid string" "str(\)" } */ - str (\\\); /* { dg-warning "valid string" "str(\\\)" } */ + str (\); /* { dg-warning "valid string" "str(\\)" } */ + str (\\); /* OK. */ + str (\\\); /* { dg-warning "valid string" "str(\\\\\\)" } */ /* This also serves as a useful test of the value of __INCLUDE_LEVEL. */ if (strcmp (xstr (__INCLUDE_LEVEL__), "0")) @@ -26,6 +27,9 @@ int main (int argc, char *argv[]) if (strcmp(str (__INCLUDE_LEVEL__), "__INCLUDE_LEVEL__")) err ("macro name"); + if (strcmp(str(), "") || strcmp(str( ), "")) + err ("empty string"); + if (strcmp(str ("s\n"), "\"s\\n\"")) err ("quoted string"); |