1/// Invalid output path (%t is a file, not a directory).
2// RUN: rm -rf %t && touch %t
3// RUN: not clang-doc %s -output=%t/subdir 2>&1 | FileCheck %s --check-prefix=OUTPUT-FAIL
4// OUTPUT-FAIL: clang-doc error:
5// OUTPUT-FAIL-SAME: failed to create directory.
6
7/// Invalid format option.
8// RUN: rm -rf %t && mkdir %t && touch %t/file
9// RUN: not clang-doc %s --output=%t/file -format=badformat 2>&1 | FileCheck %s --check-prefix=BAD-FORMAT
10// BAD-FORMAT: clang-doc: for the --format option: Cannot find option named 'badformat'!
11
12/// Missing HTML asset directory (warning only).
13// RUN: clang-doc %s -format=html -asset=%t/nonexistent-assets 2>&1 | FileCheck %s --check-prefix=ASSET-WARN
14// ASSET-WARN: Asset path supply is not a directory
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///Invalid executor type
25// RUN: not clang-doc --executor=invalid %s 2>&1 | FileCheck %s --check-prefix=EXECUTOR-FAIL
26// EXECUTOR-FAIL: clang-doc error:
27// EXECUTOR-FAIL: Executor "invalid" is not registered
28
29///TODO: Add tests for failures in generateDocs() and in createResources().
30

Provided by KDAB

Privacy Policy
Improve your Profiling and Debugging skills
Find out more

source code of clang-tools-extra/test/clang-doc/invalid-options.cpp