r239009 - Fix fragile source-col-map.c test-case.
James Y Knight
jyknight at google.com
Wed Jun 3 21:15:33 PDT 2015
Author: jyknight
Date: Wed Jun 3 23:15:33 2015
New Revision: 239009
URL: http://llvm.org/viewvc/llvm-project?rev=239009&view=rev
Log:
Fix fragile source-col-map.c test-case.
The test passing was dependent upon your source tree being checked out
in a directory with a long enough path, to cause the diagnostics to
wrap at the expected locations.
Use stdin instead, so that the error messages consistently use
<stdin> as the filename, and get wrapped consistently.
Modified:
cfe/trunk/test/Frontend/source-col-map.c
Modified: cfe/trunk/test/Frontend/source-col-map.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Frontend/source-col-map.c?rev=239009&r1=239008&r2=239009&view=diff
==============================================================================
--- cfe/trunk/test/Frontend/source-col-map.c (original)
+++ cfe/trunk/test/Frontend/source-col-map.c Wed Jun 3 23:15:33 2015
@@ -1,4 +1,4 @@
-// RUN: not %clang_cc1 %s -fsyntax-only -fmessage-length 75 -o /dev/null 2>&1 | FileCheck %s -strict-whitespace
+// RUN: not %clang_cc1 -fsyntax-only -fmessage-length 75 -o /dev/null -x c < %s 2>&1 | FileCheck %s -strict-whitespace
// Test case for the text diagnostics source column conversion crash.
@@ -31,7 +31,8 @@ void test2(Unknown* b); // ααα
void test3() {
/* αααα αααα αααα αααα αααα αααα αααα αααα αααα αααα */ printf("%d", "s");
}
-// CHECK: format specifies type 'int' but the argument has type 'char *'
+// CHECK: format specifies type 'int' but the argument has
+// CHECK: type 'char *'
// CHECK-NEXT: ...αααα αααα αααα αααα αααα αααα αααα αααα αααα */ printf("%d", "s");
// CHECK-NEXT: {{^ ~~ \^~~$}}
// CHECK-NEXT: {{^ %s$}}
More information about the cfe-commits
mailing list