1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Multi-rename sequence — example/ project (A.sol ↔ AA.sol round-trip)
#
# Tests the full rename lifecycle:
# 1. A.sol → AA.sol (B.sol import should update "./A.sol" → "./AA.sol")
# 2. AA.sol → A.sol (B.sol import should update back "./AA.sol" → "./A.sol")
# 3. A.sol → AA.sol (repeat — verifies re-index worked after step 2)
# 4. AA.sol → A.sol (repeat — verifies no corruption on second round-trip)
#
# This catches:
# - First rename with no buffers open (eager project index)
# - Stale AST cache between renames
# - Corrupted imports on rename-back
# - text_cache not migrated after didRenameFiles
#
# lsp-bench -c benchmarks/example-rename-sequence.yaml
project: example
file: B.sol
line: 3
col: 8
output: benchmarks/example-rename-sequence
report: README.md
servers:
- mmsaki@latest
benchmarks:
- workspace/willRenameFiles
methods:
workspace/willRenameFiles:
renameFiles:
# Step 1: A.sol → AA.sol
- file: A.sol
newName: AA.sol
expect:
count: 1 # 1 file (B.sol) should have edits
# Step 2: AA.sol → A.sol (rename back)
- file: AA.sol
newName: A.sol
expect:
count: 1
# Step 3: A.sol → AA.sol (second round-trip)
- file: A.sol
newName: AA.sol
expect:
count: 1
# Step 4: AA.sol → A.sol (restore)
- file: AA.sol
newName: A.sol
expect:
count: 1