[clang-tools-extra] 6cfcf02 - [clangd] Fix the include-cleaner-batch-fix.test failure on some
Haojian Wu via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 27 05:59:50 PDT 2023
Author: Haojian Wu
Date: 2023-04-27T14:59:37+02:00
New Revision: 6cfcf0242f3260a3a90bac68e9f271548caa8372
URL: https://github.com/llvm/llvm-project/commit/6cfcf0242f3260a3a90bac68e9f271548caa8372
DIFF: https://github.com/llvm/llvm-project/commit/6cfcf0242f3260a3a90bac68e9f271548caa8372.diff
LOG: [clangd] Fix the include-cleaner-batch-fix.test failure on some
platforms
It seems that on some platforms, the spelling include doesn't work. Make
the test less strict on it.
Added:
Modified:
clang-tools-extra/clangd/test/include-cleaner-batch-fix.test
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/test/include-cleaner-batch-fix.test b/clang-tools-extra/clangd/test/include-cleaner-batch-fix.test
index b07da2a9b4df8..4b2208ba3e146 100644
--- a/clang-tools-extra/clangd/test/include-cleaner-batch-fix.test
+++ b/clang-tools-extra/clangd/test/include-cleaner-batch-fix.test
@@ -123,7 +123,7 @@
# CHECK-NEXT: {
# CHECK-NEXT: "edits": [
# CHECK-NEXT: {
-# CHECK-NEXT: "newText": "#include <foo.h>\n",
+# CHECK-NEXT: "newText": "#include {{.*}}foo.h{{.*}}",
# CHECK-NEXT: "range": {
# CHECK-NEXT: "end": {
# CHECK-NEXT: "character": 0,
@@ -145,7 +145,7 @@
# CHECK-NEXT: }
# CHECK-NEXT: ],
# CHECK-NEXT: "command": "clangd.applyFix",
-# CHECK-NEXT: "title": "Apply fix: #include <foo.h>"
+# CHECK-NEXT: "title": "Apply fix: #include {{.*}}foo.h{{.*}}"
# CHECK-NEXT: },
# CHECK-NEXT: {
# CHECK-NEXT: "arguments": [
@@ -165,7 +165,7 @@
# CHECK-NEXT: "edits": [
# CHECK-NEXT: {
# CHECK-NEXT: "annotationId": "AddAllMissingIncludes0",
-# CHECK-NEXT: "newText": "#include <bar.h>\n",
+# CHECK-NEXT: "newText": "#include {{.*}}bar.h{{.*}}",
# CHECK-NEXT: "range": {
# CHECK-NEXT: "end": {
# CHECK-NEXT: "character": 0,
@@ -179,7 +179,7 @@
# CHECK-NEXT: },
# CHECK-NEXT: {
# CHECK-NEXT: "annotationId": "AddAllMissingIncludes1",
-# CHECK-NEXT: "newText": "#include <foo.h>\n",
+# CHECK-NEXT: "newText": "#include {{.*}}foo.h{{.*}}",
# CHECK-NEXT: "range": {
# CHECK-NEXT: "end": {
# CHECK-NEXT: "character": 0,
@@ -257,7 +257,7 @@
# CHECK-NEXT: },
# CHECK-NEXT: {
# CHECK-NEXT: "annotationId": "AddAllMissingIncludes0",
-# CHECK-NEXT: "newText": "#include <bar.h>\n",
+# CHECK-NEXT: "newText": "#include {{.*}}bar.h{{.*}}",
# CHECK-NEXT: "range": {
# CHECK-NEXT: "end": {
# CHECK-NEXT: "character": 0,
@@ -271,7 +271,7 @@
# CHECK-NEXT: },
# CHECK-NEXT: {
# CHECK-NEXT: "annotationId": "AddAllMissingIncludes1",
-# CHECK-NEXT: "newText": "#include <foo.h>\n",
+# CHECK-NEXT: "newText": "#include {{.*}}foo.h{{.*}}",
# CHECK-NEXT: "range": {
# CHECK-NEXT: "end": {
# CHECK-NEXT: "character": 0,
@@ -442,7 +442,7 @@
# CHECK-NEXT: },
# CHECK-NEXT: {
# CHECK-NEXT: "annotationId": "AddAllMissingIncludes0",
-# CHECK-NEXT: "newText": "#include <bar.h>\n",
+# CHECK-NEXT: "newText": "#include {{.*}}bar.h{{.*}}",
# CHECK-NEXT: "range": {
# CHECK-NEXT: "end": {
# CHECK-NEXT: "character": 0,
@@ -456,7 +456,7 @@
# CHECK-NEXT: },
# CHECK-NEXT: {
# CHECK-NEXT: "annotationId": "AddAllMissingIncludes1",
-# CHECK-NEXT: "newText": "#include <foo.h>\n",
+# CHECK-NEXT: "newText": "#include {{.*}}foo.h{{.*}}",
# CHECK-NEXT: "range": {
# CHECK-NEXT: "end": {
# CHECK-NEXT: "character": 0,
More information about the cfe-commits
mailing list