Skip to content

Commit 3862eb9

Browse files
committed
Add more test cases for clang-doc failures
1 parent abe8165 commit 3862eb9

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed
Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,24 @@
1-
/// Invalid output path (%t is a file, not a directory)
1+
/// Invalid output path (%t is a file, not a directory).
22
// RUN: rm -rf %t && touch %t
33
// RUN: not clang-doc %s -output=%t/subdir 2>&1 | FileCheck %s
44
// CHECK: clang-doc error:
55
// CHECK: {{(Not a directory|no such file or directory)}}
66

7-
/// Invalid format option
7+
/// Invalid format option.
88
// RUN: not clang-doc %s -format=badformat 2>&1 | FileCheck %s --check-prefix=BAD-FORMAT
99
// BAD-FORMAT: clang-doc: for the --format option: Cannot find option named 'badformat'!
10+
11+
/// Missing HTML asset directory (warning only).
12+
// RUN: clang-doc %s -format=html -asset=%t/nonexistent-assets 2>&1 | FileCheck %s --check-prefix=ASSET-WARN
13+
// ASSET-WARN: Asset path supply is not a directory
14+
// ASSET-WARN: falling back to default
15+
16+
/// Mapping failure (with --ignore-map-errors=false).
17+
// RUN: not clang-doc %t/nonexistent.cpp -ignore-map-errors=false 2>&1 | FileCheck %s --check-prefix=MAP-FAIL
18+
// MAP-FAIL: clang-doc error: Failed to run action
19+
20+
/// Mapping failure (with --ignore-map-errors=true).
21+
// RUN: clang-doc %t/nonexistent.cpp 2>&1 | FileCheck %s --check-prefix=MAP-WARN
22+
// MAP-WARN: Error mapping decls in files. Clang-doc will ignore these files and continue
23+
24+
///TODO: Add tests for failures in generateDocs() and in createResources().

0 commit comments

Comments
 (0)