r210510 - Improve specificity in the diag-mapping2.c test
Alp Toker
alp at nuanti.com
Mon Jun 9 23:08:41 PDT 2014
Author: alp
Date: Tue Jun 10 01:08:41 2014
New Revision: 210510
URL: http://llvm.org/viewvc/llvm-project?rev=210510&view=rev
Log:
Improve specificity in the diag-mapping2.c test
Make sure grep catches the correct diagnostic, otherwise this test fails to
detect broken functionality.
Modified:
cfe/trunk/test/Misc/diag-mapping2.c
Modified: cfe/trunk/test/Misc/diag-mapping2.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Misc/diag-mapping2.c?rev=210510&r1=210509&r2=210510&view=diff
==============================================================================
--- cfe/trunk/test/Misc/diag-mapping2.c (original)
+++ cfe/trunk/test/Misc/diag-mapping2.c Tue Jun 10 01:08:41 2014
@@ -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
-
More information about the cfe-commits
mailing list