Skip to content

Commit 3a0f02e

Browse files
committed
Fix unittest failures in Windows
1 parent b39f36e commit 3a0f02e

File tree

1 file changed

+9
-6
lines changed
  • clang-tools-extra/include-cleaner/test

1 file changed

+9
-6
lines changed

clang-tools-extra/include-cleaner/test/tool.cpp

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,15 @@ int x = foo();
4949
// RUN: FileCheck --match-full-lines --check-prefix=EDIT2 %s < %t.cpp
5050
// EDIT2-NOT: {{^}}#include "foo.h"{{$}}
5151

52+
// This test has commands that rely on shell capabilities that won't execute
53+
// correctly on Windows e.g. subshell execution
54+
// REQUIRES: shell
5255
// RUN: mkdir -p $(dirname %t)/out
5356
// RUN: cp %s %t.cpp
5457
// RUN: echo "[{\"directory\":\"$(dirname %t)/out\",\"file\":\"../$(basename %t).cpp\",\"command\":\":clang++ -I%S/Inputs/ ../$(basename %t).cpp\"}]" > $(dirname %t)/out/compile_commands.json
55-
// RUN: pushd $(dirname %t)
56-
// RUN: clang-include-cleaner -p out -edit $(basename %t).cpp
57-
// RUN: popd
58-
// RUN: FileCheck --match-full-lines --check-prefix=EDIT3 %s < %t.cpp
59-
// EDIT3: #include "foo.h"
60-
// EDIT3-NOT: {{^}}#include "foobar.h"{{$}}
58+
// RUN: pushd $(dirname %t)
59+
// RUN: clang-include-cleaner -p out -edit $(basename %t).cpp
60+
// RUN: popd
61+
// RUN: FileCheck --match-full-lines --check-prefix=EDIT3 %s < %t.cpp
62+
// EDIT3: #include "foo.h"
63+
// EDIT3-NOT: {{^}}#include "foobar.h"{{$}}

0 commit comments

Comments
 (0)