Skip to content

Commit cfb0cc7

Browse files
robertoaloimeta-codesync[bot]
authored andcommitted
Skip -doc related tests in OTP 26
Summary: These tests are [failing](https://github.com/WhatsApp/erlang-language-platform/actions/runs/18524392477/job/52791633535?fbclid=IwY2xjawNjXYZleHRuA2FlbQIxMQABHswY-qu3EAMNTujyjsBQGdWnD7vuTcYj-SYMLLY7UHYWSTWYYnZPD4P5Bma6_aem_7LD-IIvZSkeMmZrTaOw7sA) on GitHub pipelines using OTP 26. The tests only make sense for OTP 27+, so do not run them on older versions. Reviewed By: TheGeorge Differential Revision: D85071954 fbshipit-source-id: fa8c665cc11e191ae7c4e073f844a8eb0c60c66b
1 parent 5412625 commit cfb0cc7

File tree

1 file changed

+20
-12
lines changed

1 file changed

+20
-12
lines changed

crates/ide/src/handlers/get_docs.rs

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ pub(crate) fn get_doc_for_token(
2525

2626
#[cfg(test)]
2727
mod tests {
28+
use elp_project_model::otp::supports_eep59_doc_attributes;
29+
2830
use crate::fixture;
2931

3032
#[track_caller]
@@ -40,8 +42,9 @@ mod tests {
4042

4143
#[test]
4244
fn local_type() {
43-
check(
44-
r#"
45+
if supports_eep59_doc_attributes() {
46+
check(
47+
r#"
4548
-module(main).
4649
-export([main/0]).
4750
-doc """
@@ -52,21 +55,23 @@ My integer
5255
-spec main() -> my_in~teger().
5356
main() -> 42.
5457
"#,
55-
"\
58+
"\
5659
```erlang
5760
-type my_integer() :: integer().
5861
```
5962
6063
-----
6164
6265
My integer",
63-
);
66+
);
67+
}
6468
}
6569

6670
#[test]
6771
fn remote_type() {
68-
check(
69-
r#"
72+
if supports_eep59_doc_attributes() {
73+
check(
74+
r#"
7075
//- /src/main.erl
7176
-module(main).
7277
-export([main/0]).
@@ -81,21 +86,23 @@ My integer
8186
-export_type([my_integer/0]).
8287
-type my_integer() :: integer().
8388
"#,
84-
"\
89+
"\
8590
```erlang
8691
-type my_integer() :: integer().
8792
```
8893
8994
-----
9095
9196
My integer",
92-
);
97+
);
98+
}
9399
}
94100

95101
#[test]
96102
fn local_function() {
97-
check(
98-
r#"
103+
if supports_eep59_doc_attributes() {
104+
check(
105+
r#"
99106
-module(main).
100107
-export([main/0]).
101108
@@ -108,14 +115,15 @@ main() -> ok.
108115
-spec caller() -> ok.
109116
caller() -> ma~in().
110117
"#,
111-
"\
118+
"\
112119
```erlang
113120
-spec main() -> ok.
114121
```
115122
116123
-----
117124
118125
My function",
119-
);
126+
);
127+
}
120128
}
121129
}

0 commit comments

Comments
 (0)