|
1 | 1 | // Fixes #59819. The underlying problem was fixed in https://reviews.llvm.org/D142560, but this patch adds a proper regression test. |
2 | 2 | // RUN: rm -rf %t && mkdir -p %t |
3 | 3 | // RUN: clang-doc --format=md --doxygen --output=%t --executor=standalone %s |
4 | | -// RUN: FileCheck %s < %t/GlobalNamespace/MyClass.md --check-prefix=MD-MyClass-LINE |
5 | | -// RUN: FileCheck %s < %t/GlobalNamespace/MyClass.md --check-prefix=MD-MyClass |
| 4 | +// RUN: FileCheck %s < %t/GlobalNamespace/MyClass.md --check-prefix=MD-MYCLASS-LINE |
| 5 | +// RUN: FileCheck %s < %t/GlobalNamespace/MyClass.md --check-prefix=MD-MYCLASS |
6 | 6 | // RUN: clang-doc --format=html --doxygen --output=%t --executor=standalone %s |
7 | | -// RUN: FileCheck %s < %t/GlobalNamespace/MyClass.html --check-prefix=HTML-MyClass-LINE |
8 | | -// RUN: FileCheck %s < %t/GlobalNamespace/MyClass.html --check-prefix=HTML-MyClass |
| 7 | +// RUN: FileCheck %s < %t/GlobalNamespace/MyClass.html --check-prefix=HTML-MYCLASS-LINE |
| 8 | +// RUN: FileCheck %s < %t/GlobalNamespace/MyClass.html --check-prefix=HTML-MYCLASS |
9 | 9 |
|
10 | 10 | #define DECLARE_METHODS \ |
11 | 11 | /** \ |
|
16 | 16 | return a + b; \ |
17 | 17 | } |
18 | 18 |
|
19 | | -// MD-MyClass: ### Add |
20 | | -// MD-MyClass: *public int Add(int a, int b)* |
21 | | -// MD-MyClass: **brief** Declare a method to calculate the sum of two numbers |
| 19 | +// MD-MYCLASS: ### Add |
| 20 | +// MD-MYCLASS: *public int Add(int a, int b)* |
| 21 | +// MD-MYCLASS: **brief** Declare a method to calculate the sum of two numbers |
22 | 22 |
|
23 | | -// HTML-MyClass: <p>public int Add(int a, int b)</p> |
24 | | -// HTML-MyClass: <div>brief</div> |
25 | | -// HTML-MyClass: <p> Declare a method to calculate the sum of two numbers</p> |
| 23 | +// HTML-MYCLASS: <p>public int Add(int a, int b)</p> |
| 24 | +// HTML-MYCLASS: <div>brief</div> |
| 25 | +// HTML-MYCLASS: <p> Declare a method to calculate the sum of two numbers</p> |
26 | 26 |
|
27 | 27 |
|
28 | 28 | class MyClass { |
29 | 29 | public: |
30 | | -// MD-MyClass-LINE: *Defined at {{.*}}clang-tools-extra{{[\/]}}test{{[\/]}}clang-doc{{[\/]}}macro.cpp#[[@LINE+2]]* |
31 | | -// HTML-MyClass-LINE: <p>Defined at line [[@LINE+1]] of file {{.*}}clang-tools-extra{{[\/]}}test{{[\/]}}clang-doc{{[\/]}}macro.cpp</p> |
| 30 | +// MD-MYCLASS-LINE: *Defined at {{.*}}clang-tools-extra{{[\/]}}test{{[\/]}}clang-doc{{[\/]}}macro.cpp#[[@LINE+2]]* |
| 31 | +// HTML-MYCLASS-LINE: <p>Defined at line [[@LINE+1]] of file {{.*}}clang-tools-extra{{[\/]}}test{{[\/]}}clang-doc{{[\/]}}macro.cpp</p> |
32 | 32 | DECLARE_METHODS |
33 | 33 | }; |
34 | 34 |
|
35 | | - |
0 commit comments