Skip to content

Commit 2b6556e

Browse files
committed
Fixes #59819. The underlying problem was fixed in https://reviews.llvm.org/D142560, but this patch adds a proper regression test.
1 parent b15a9d0 commit 2b6556e

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed
Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// Fixes #59819. The underlying problem was fixed in https://reviews.llvm.org/D142560, but this patch adds a proper regression test.
22
// RUN: rm -rf %t && mkdir -p %t
33
// 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
66
// 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
99

1010
#define DECLARE_METHODS \
1111
/** \
@@ -16,20 +16,19 @@
1616
return a + b; \
1717
}
1818

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
2222

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>
2626

2727

2828
class MyClass {
2929
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>
3232
DECLARE_METHODS
3333
};
3434

35-

0 commit comments

Comments
 (0)