Skip to content

Commit 67fa6ea

Browse files
authored
[clang-doc] [test] Generalize error message patterns (llvm#142373)
On Windows, we hit the "no such file or directory" case, not the "Not a directory" one. MS STL produces the "no such file or directory" message for `std::error_code(ENOENT, std::generic_category()).message()`, while libc++ and libstdc++ produce a similar message with a capital N. Adjust the error message regex to match for either of them. That said, this kind of test is very brittle with respect to portability.
1 parent 04b63ac commit 67fa6ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang-tools-extra/test/clang-doc/invalid-options.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// RUN: rm -rf %t && touch %t
33
// RUN: not clang-doc %s -output=%t/subdir 2>&1 | FileCheck %s --check-prefix=OUTPUT-FAIL
44
// OUTPUT-FAIL: clang-doc error:
5-
// OUTPUT-FAIL: {{(Not a directory|no such file or directory)}}
5+
// OUTPUT-FAIL: {{(Not a directory|[Nn]o such file or directory)}}
66

77
/// Invalid format option.
88
// RUN: rm -rf %t && mkdir %t && touch %t/file

0 commit comments

Comments
 (0)