]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* gcc.dg/cpp/multiline.c: New test.
authorNeil Booth <neil@daikokuya.demon.co.uk>
Sun, 17 Dec 2000 14:33:34 +0000 (14:33 +0000)
committerNeil Booth <neil@gcc.gnu.org>
Sun, 17 Dec 2000 14:33:34 +0000 (14:33 +0000)
From-SVN: r38330

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/cpp/multiline.c [new file with mode: 0644]

index 54f7a3853ed8b33e69169776834159946b357845..f0f072485e1c2a68019467510a174be56628f5e9 100644 (file)
@@ -1,3 +1,7 @@
+2000-12-17  Neil Booth  <neil@daikokuya.demon.co.uk>
+
+        * gcc.dg/cpp/multiline.c: New test.
+
 2000-12-17  Neil Booth  <neil@daikokuya.demon.co.uk>
 
         * g++.old-deja/g++.other/syshdr1.C: Update.
diff --git a/gcc/testsuite/gcc.dg/cpp/multiline.c b/gcc/testsuite/gcc.dg/cpp/multiline.c
new file mode 100644 (file)
index 0000000..36b6053
--- /dev/null
@@ -0,0 +1,24 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.  */
+/* { dg-do preprocess } */
+/* { dg-options "-C" } */
+/* Test that multi-line tokens are recognised by cpp0 as being
+   multiline .  Source: Neil Booth, 17 Dec 2000.  */
+/* Line 1
+   Line 2
+   Line 3
+   Line 4
+*/
+"line 1
+ line 2
+ line 3
+ line 4"
+L"line 1
+  line 2
+  line 3
+  line 4"
+/* Nowhere in the output of this file should there be a blank line.
+   We check for that in the .i file.
+   { dg-final { if ![file exists multiline.i] { return }                } }
+   { dg-final { if \{ [grep multiline.i "^$"] == "" \} \{               } }
+   { dg-final { return \}                                               } }
+   { dg-final { fail "multiline.c: multi-line tokens"                   } } */