From: James Y Knight Date: Thu, 4 Jun 2015 04:15:33 +0000 (+0000) Subject: Fix fragile source-col-map.c test-case. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f53f665750106d5cb4720e65bc95aab6fca9db1b;p=clang 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 as the filename, and get wrapped consistently. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239009 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Frontend/source-col-map.c b/test/Frontend/source-col-map.c index a14023bc82..ae69fbe565 100644 --- a/test/Frontend/source-col-map.c +++ b/test/Frontend/source-col-map.c @@ -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$}}