]> granicus.if.org Git - clang/commitdiff
Improve specificity in the diag-mapping2.c test
authorAlp Toker <alp@nuanti.com>
Tue, 10 Jun 2014 06:08:41 +0000 (06:08 +0000)
committerAlp Toker <alp@nuanti.com>
Tue, 10 Jun 2014 06:08:41 +0000 (06:08 +0000)
Make sure grep catches the correct diagnostic, otherwise this test fails to
detect broken functionality.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210510 91177308-0d34-0410-b5e6-96231b3b80d8

test/Misc/diag-mapping2.c

index c4ade074cb0568c25e9f426aa899584cd0144841..672d0548ad827b2ae44ad8be21124fd8f0f3a386 100644 (file)
@@ -1,22 +1,21 @@
 // This should warn by default.
-// RUN: %clang_cc1 %s 2>&1 | grep "warning:"
+// RUN: %clang_cc1 %s 2>&1 | grep "warning: foo"
 
 // This should not emit anything.
 // RUN: %clang_cc1 %s -w 2>&1 | not grep diagnostic
 // RUN: %clang_cc1 %s -Wno-#warnings 2>&1 | not grep diagnostic
 
 // -Werror can map all warnings to error.
-// RUN: not %clang_cc1 %s -Werror 2>&1 | grep "error:"
+// RUN: not %clang_cc1 %s -Werror 2>&1 | grep "error: foo"
 
 // -Werror can map this one warning to error.
-// RUN: not %clang_cc1 %s -Werror=#warnings 2>&1 | grep "error:"
+// RUN: not %clang_cc1 %s -Werror=#warnings 2>&1 | grep "error: foo"
 
 // -Wno-error= overrides -Werror.  rdar://3158301
-// RUN: %clang_cc1 %s -Werror -Wno-error=#warnings 2>&1 | grep "warning:"
+// RUN: %clang_cc1 %s -Werror -Wno-error=#warnings 2>&1 | grep "warning: foo"
 
 // -Wno-error overrides -Werror.  PR4715
-// RUN: %clang_cc1 %s -Werror -Wno-error 2>&1 | grep "warning:"
+// RUN: %clang_cc1 %s -Werror -Wno-error 2>&1 | grep "warning: foo"
 
 #warning foo
 
-