Skip to content

Commit 4f14925

Browse files
committed
Runs workspace tests with all features
1 parent 0c60b9a commit 4f14925

5 files changed

Lines changed: 19 additions & 30 deletions

File tree

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
- name: Install Rust toolchain
5959
uses: dtolnay/rust-toolchain@stable
6060
- name: Run Tests
61-
run: cargo test --workspace --features emmylua_ls/full-test
61+
run: cargo test --workspace --all-features
6262

6363
check-schema:
6464
name: Check schema generation

crates/emmylua_ls/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,4 @@ required-features = ["cli"]
6262
[features]
6363
default = ["cli"]
6464
cli = ["dep:clap", "dep:mimalloc", "emmylua_code_analysis/reqwest"]
65-
full-test = []
65+
slow-tests = []

crates/emmylua_ls/src/context/workspace_manager.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#[cfg(all(test, feature = "full-test"))]
1+
#[cfg(all(test, feature = "slow-tests"))]
22
mod tests;
33

44
use std::collections::{HashMap, HashSet};

crates/emmylua_ls/src/handlers/configuration/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ impl RegisterCapabilities for ConfigurationCapabilities {
5050
fn register_capabilities(_: &mut ServerCapabilities, _: &ClientCapabilities) {}
5151
}
5252

53-
#[cfg(all(test, feature = "full-test"))]
53+
#[cfg(all(test, feature = "slow-tests"))]
5454
mod tests {
5555
use super::*;
5656
use std::{

crates/emmylua_ls/src/handlers/test/semantic_token_test.rs

Lines changed: 15 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -28,32 +28,6 @@ mod tests {
2828
result
2929
}
3030

31-
fn make_issue_1028_repeated_prefix_guard_chain_content() -> String {
32-
let mut content = String::from("V_cfad19afc42b = V_cfad19afc42b or {}\n");
33-
for i in 0..600 {
34-
let table_key = 3_121_212;
35-
let field_key = 1_111_112 + i;
36-
content.push_str(&format!(
37-
"if V_cfad19afc42b[{table_key}] and V_cfad19afc42b[{table_key}][{field_key}] then\n V_cfad19afc42b[{table_key}][{field_key}][\"__STR_{i}__\"] = \"__STR_{}__\"\nend\n\n",
38-
i + 1,
39-
));
40-
}
41-
content
42-
}
43-
44-
#[gtest]
45-
fn test_1() -> Result<()> {
46-
let mut ws = ProviderVirtualWorkspace::new();
47-
let _ = ws.check_semantic_token(
48-
r#"
49-
---@class Cast1
50-
---@field a string # test
51-
"#,
52-
vec![],
53-
);
54-
Ok(())
55-
}
56-
5731
#[gtest]
5832
fn test_require_alias_prefix_is_namespace_in_index_expr() -> Result<()> {
5933
let mut ws = ProviderVirtualWorkspace::new();
@@ -148,6 +122,21 @@ m.foo()
148122
Ok(())
149123
}
150124

125+
#[cfg(feature = "slow-tests")]
126+
fn make_issue_1028_repeated_prefix_guard_chain_content() -> String {
127+
let mut content = String::from("V_cfad19afc42b = V_cfad19afc42b or {}\n");
128+
for i in 0..600 {
129+
let table_key = 3_121_212;
130+
let field_key = 1_111_112 + i;
131+
content.push_str(&format!(
132+
"if V_cfad19afc42b[{table_key}] and V_cfad19afc42b[{table_key}][{field_key}] then\n V_cfad19afc42b[{table_key}][{field_key}][\"__STR_{i}__\"] = \"__STR_{}__\"\nend\n\n",
133+
i + 1,
134+
));
135+
}
136+
content
137+
}
138+
139+
#[cfg(feature = "slow-tests")]
151140
#[gtest]
152141
fn test_issue_1028_i18n_semantic_tokens_repeated_prefix_guard_chain() -> Result<()> {
153142
let mut ws = ProviderVirtualWorkspace::new();

0 commit comments

Comments
 (0)