Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita007df3

Browse files
mizchiclaude
andcommitted
test: add integration tests for custom LSP without preset
Add comprehensive tests for using --bin and --files options without preset:- TypeScript LSP via typescript-language-server- Veryl LSP for hardware description language- Custom file pattern filtering (src/**/*.ts)- Test fixtures for Veryl and structured TypeScript projectsThese tests verify that lsmcp can connect to any LSP serverby specifying the binary path and file patterns directly.🤖 Generated with [Claude Code](https://claude.ai/code)Co-Authored-By: Claude <noreply@anthropic.com>
1 parentfab6be9 commita007df3

File tree

8 files changed

+472
-0
lines changed

8 files changed

+472
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
exportclassCalculator{
2+
add(a:number,b:number):number{
3+
returna+b;
4+
}
5+
6+
subtract(a:number,b:number):number{
7+
returna-b;
8+
}
9+
}
10+
11+
exportfunctioncreateCalculator():Calculator{
12+
returnnewCalculator();
13+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import{Calculator}from"../src/main";
2+
3+
describe("Calculator",()=>{
4+
constcalc=newCalculator();
5+
6+
test("should add numbers",()=>{
7+
expect(calc.add(2,3)).toBe(5);
8+
});
9+
10+
test("should subtract numbers",()=>{
11+
expect(calc.subtract(5,3)).toBe(2);
12+
});
13+
});
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"compilerOptions": {
3+
"target":"ES2020",
4+
"module":"commonjs",
5+
"strict":true,
6+
"esModuleInterop":true,
7+
"skipLibCheck":true,
8+
"forceConsistentCasingInFileNames":true
9+
}
10+
}

‎tests/fixtures/veryl/Veryl.lock‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# This file is automatically @generated by Veryl.
2+
# It is not intended for manual editing.
3+
version = 1
4+
projects = []

‎tests/fixtures/veryl/Veryl.toml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[project]
2+
name ="test_project"
3+
version ="0.1.0"

‎tests/fixtures/veryl/adder.veryl‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module Adder #(
2+
parameter WIDTH: u32 = 8
3+
) (
4+
a: input logic<WIDTH>,
5+
b: input logic<WIDTH>,
6+
sum: output logic<WIDTH>
7+
) {
8+
assign sum = a + b;
9+
}

‎tests/fixtures/veryl/counter.veryl‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module Counter (
2+
clk: input clock,
3+
rst: input reset,
4+
en: input logic,
5+
cnt: output logic<8>
6+
) {
7+
always_ff (clk, rst) {
8+
if_reset {
9+
cnt = 0;
10+
} else if en {
11+
cnt = cnt + 1;
12+
}
13+
}
14+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp