]> granicus.if.org Git - clang/commitdiff
[c-index-test] For the '-remap-file' option use a comma for separator which is more
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Thu, 5 Dec 2013 20:13:27 +0000 (20:13 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Thu, 5 Dec 2013 20:13:27 +0000 (20:13 +0000)
Windows friendly than the colon.

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

test/Index/Inputs/crash-recovery-code-complete-remap.c
test/Index/crash-recovery-code-complete.c
test/Index/crash-recovery-reparse.c
test/Index/preamble-reparse-cmd-define.c
test/Index/preamble-reparse.c
test/Index/remap-complete.c
test/Index/remap-cursor-at.c
test/Index/remap-load.c
tools/c-index-test/c-index-test.c

index f4564e1f6088c0274b1b024f5328dec9e8c434d3..fc63c9fd245cd4b1d088a1c7f88afb859cdf4cc9 100644 (file)
@@ -1,6 +1,6 @@
 // RUN: echo env CINDEXTEST_EDITING=1 \
 // RUN:   not c-index-test -test-load-source-reparse 1 local \
-// RUN:   -remap-file="%s:%S/Inputs/crash-recovery-code-complete-remap.c" \
+// RUN:   -remap-file="%s,%S/Inputs/crash-recovery-code-complete-remap.c" \
 // RUN:   %s 2> %t.err
 // RUN: FileCheck < %t.err -check-prefix=CHECK-CODE-COMPLETE-CRASH %s
 // CHECK-CODE-COMPLETE-CRASH: Unable to reparse translation unit
index 55552acc93c91bcc7f7c0432cd854f94678c5e26..0adf20ffeed5e3f6cafaa9a230a8fb31c8b2ad48 100644 (file)
@@ -1,6 +1,6 @@
 // RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_PREAMBLE_FILE=%t-preamble.pch \
 // RUN:   not c-index-test -code-completion-at=%s:20:1 \
-// RUN:   "-remap-file=%s:%S/Inputs/crash-recovery-code-complete-remap.c" \
+// RUN:   "-remap-file=%s,%S/Inputs/crash-recovery-code-complete-remap.c" \
 // RUN:   %s 2> %t.err
 // RUN: FileCheck < %t.err -check-prefix=CHECK-CODE-COMPLETE-CRASH %s
 // RUN: test ! -e %t-preamble.pch
index 4aeef5806176dfd88f567373770d5921a653c72c..baa6604b53520bfd0b010a9741c29d26bb102197 100644 (file)
@@ -1,6 +1,6 @@
 // RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_PREAMBLE_FILE=%t-preamble.pch \
 // RUN:   not c-index-test -test-load-source-reparse 1 local \
-// RUN:   -remap-file="%s:%S/Inputs/crash-recovery-reparse-remap.c" \
+// RUN:   -remap-file="%s,%S/Inputs/crash-recovery-reparse-remap.c" \
 // RUN:   %s 2> %t.err
 // RUN: FileCheck < %t.err -check-prefix=CHECK-REPARSE-SOURCE-CRASH %s
 // RUN: test ! -e $t-preamble.pch
index ca8adcb875335dfa6d456982cc298206604c9003..3fa76836d6147694a65302c5b3e3113ab81f0cc7 100644 (file)
@@ -1,6 +1,6 @@
 // RUN: c-index-test -write-pch %t.h.pch %s.h
 // RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_REMAP_AFTER_TRIAL=1 c-index-test -test-load-source-reparse 3 local \ 
-// RUN:           "-remap-file=%s:%s.remap" %s -include %t.h -D CMD_MACRO=1 2>&1 | FileCheck %s
+// RUN:           "-remap-file=%s,%s.remap" %s -include %t.h -D CMD_MACRO=1 2>&1 | FileCheck %s
 
 // CHECK-NOT: error:
 
index d56d5402cb79ef865a8bd2b60dc523ea5d09baf8..a7c87806d5073537d6a3827304c6152df178deb4 100644 (file)
@@ -1,2 +1,2 @@
-// RUN: env CINDEXTEST_EDITING=1 c-index-test -test-load-source-reparse 5 local "-remap-file=%S/Inputs/preamble-reparse-1.c:%S/Inputs/preamble-reparse-2.c" %S/Inputs/preamble-reparse-1.c | FileCheck %s
+// RUN: env CINDEXTEST_EDITING=1 c-index-test -test-load-source-reparse 5 local "-remap-file=%S/Inputs/preamble-reparse-1.c,%S/Inputs/preamble-reparse-2.c" %S/Inputs/preamble-reparse-1.c | FileCheck %s
 // CHECK: preamble-reparse-1.c:1:5: VarDecl=x:1:5 Extent=[1:1 - 1:6]
index 95551b997a499ff6669855370e92c20adcb3ce9c..ffc467f4a7bd1074c18c2916b31de768d879ac9f 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: c-index-test -code-completion-at=%s:6:2 -remap-file="%s:%S/Inputs/remap-complete-to.c" %s | FileCheck %s
+// RUN: c-index-test -code-completion-at=%s:6:2 -remap-file="%s,%S/Inputs/remap-complete-to.c" %s | FileCheck %s
 
 // CHECK: FunctionDecl:{ResultType int}{TypedText f0}{LeftParen (}
 void f() { }
index 7e390d2154214f83b44abea5215559bab310b592..782b6bbad7f1c3976646a1b4a1e037be2eb1bbfa 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: c-index-test -cursor-at=%s:1:15 -cursor-at=%s:2:21 -remap-file="%s:%S/Inputs/remap-load-to.c" %s | FileCheck %s
+// RUN: c-index-test -cursor-at=%s:1:15 -cursor-at=%s:2:21 -remap-file="%s,%S/Inputs/remap-load-to.c" %s | FileCheck %s
 
 // CHECK: ParmDecl=parm1:1:13 (Definition)
 // CHECK: DeclRefExpr=parm2:1:26
index 973a9477c93ae1138c74545850cb722b0fcd8896..f433fa7eac7568bb8413d26ef4be75c49621a09a 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: c-index-test -test-load-source all -remap-file="%s:%S/Inputs/remap-load-to.c" %s | FileCheck -check-prefix=CHECK %s
+// RUN: c-index-test -test-load-source all -remap-file="%s,%S/Inputs/remap-load-to.c" %s | FileCheck -check-prefix=CHECK %s
 
 // CHECK: remap-load.c:1:5: FunctionDecl=foo:1:5 (Definition) Extent=[1:1 - 3:2]
 // CHECK: remap-load.c:1:13: ParmDecl=parm1:1:13 (Definition) Extent=[1:9 - 1:18]
index 40794308065a875f686fcfb6d51a8a2fe68d611d..39cdcc149eea10235274b352d15966dbdfdb3685 100644 (file)
@@ -142,10 +142,10 @@ static int parse_remapped_files_with_opt(const char *opt_name,
     char *filename;
     char *contents;
     FILE *to_file;
-    const char *colon = strchr(arg_string, ':');
-    if (!colon) {
+    const char *sep = strchr(arg_string, ',');
+    if (!sep) {
       fprintf(stderr,
-              "error: %sfrom:to argument is missing semicolon\n", opt_name);
+              "error: %sfrom:to argument is missing comma\n", opt_name);
       free_remapped_files(*unsaved_files, i);
       *unsaved_files = 0;
       *num_unsaved_files = 0;
@@ -153,10 +153,10 @@ static int parse_remapped_files_with_opt(const char *opt_name,
     }
 
     /* Open the file that we're remapping to. */
-    to_file = fopen(colon + 1, "rb");
+    to_file = fopen(sep + 1, "rb");
     if (!to_file) {
       fprintf(stderr, "error: cannot open file %s that we are remapping to\n",
-              colon + 1);
+              sep + 1);
       free_remapped_files(*unsaved_files, i);
       *unsaved_files = 0;
       *num_unsaved_files = 0;
@@ -172,7 +172,7 @@ static int parse_remapped_files_with_opt(const char *opt_name,
     contents = (char *)malloc(unsaved->Length + 1);
     if (fread(contents, 1, unsaved->Length, to_file) != unsaved->Length) {
       fprintf(stderr, "error: unexpected %s reading 'to' file %s\n",
-              (feof(to_file) ? "EOF" : "error"), colon + 1);
+              (feof(to_file) ? "EOF" : "error"), sep + 1);
       fclose(to_file);
       free_remapped_files(*unsaved_files, i);
       free(contents);
@@ -187,7 +187,7 @@ static int parse_remapped_files_with_opt(const char *opt_name,
     fclose(to_file);
 
     /* Copy the file name that we're remapping from. */
-    filename_len = colon - arg_string;
+    filename_len = sep - arg_string;
     filename = (char *)malloc(filename_len + 1);
     memcpy(filename, arg_string, filename_len);
     filename[filename_len] = 0;