summaryrefslogtreecommitdiff
path: root/test/snapshots
diff options
context:
space:
mode:
Diffstat (limited to 'test/snapshots')
-rw-r--r--test/snapshots/lsp-rename-files.golden27
-rw-r--r--test/snapshots/lsp-rename-files.snap29
2 files changed, 56 insertions, 0 deletions
diff --git a/test/snapshots/lsp-rename-files.golden b/test/snapshots/lsp-rename-files.golden
new file mode 100644
index 00000000..230246f6
--- /dev/null
+++ b/test/snapshots/lsp-rename-files.golden
@@ -0,0 +1,27 @@
+== snap opened grid=100x25 cursor=7,8
+|Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/lsp-rename-files/cwd/lib.rs Save Tty Collapse Del TreeContext
+| 1 // main.rs
+| 2 pub fn add(a: i32, b: i32) -> i32 {
+| 3 a + b
+| 4 }
+| /tmp/pardes-snap/lsp-rename-files/cwd/main.rs Save Tty Collapse Del TreeContext
+| 1 mod lib;
+| 2
+| 3 fn main() {
+| 4 let x = add(1, 2);
+| 5 let y = add(3, 4);
+| 6 let _ = x + y;
+| 7 }
+| 8
+== snap previewed grid=100x25 cursor=14,4
+|3: 1 // main.rs Rename: 3 edit(s) across files, previewed, not applied
+|15: /tmp/pardes-snap/lsp-rename-files/cwd/+Search Save Tty Collapse Del LocationsConfig
+|16: 1 lib.rs:2:8
+|17: 2 sum
+|18: 3 main.rs:4:13-15
+|19: 4 sum
+|20: 5 main.rs:5:13-15
+|21: 6 sum
+|22: 7
diff --git a/test/snapshots/lsp-rename-files.snap b/test/snapshots/lsp-rename-files.snap
new file mode 100644
index 00000000..0114c795
--- /dev/null
+++ b/test/snapshots/lsp-rename-files.snap
@@ -0,0 +1,29 @@
+# A Rename reaches the other files open in the editor. A server renames in
+# the documents it has seen (zls's store), so before a query whose answer can
+# reach other files the client tells it of every open file of its language.
+# Here main.rs is opened by a look, asking the server nothing, and the rename
+# is asked from lib.rs: the mock answers in each document it was told of, so
+# the preview lists main.rs's two calls and lib.rs's definition.
+file lib.rs // main.rs\npub fn add(a: i32, b: i32) -> i32 {\n a + b\n}\n
+file main.rs mod lib;\n\nfn main() {\n let x = add(1, 2);\n let y = add(3, 4);\n let _ = x + y;\n}\n
+start 25 100 lib.rs
+wait 8000 pub fn add
+stable 700 20000
+press right @main.rs 4
+release right @main.rs 4
+wait 8000 let x = add
+stable 700 15000
+snap opened
+# into lib.rs's `add`, and rename it from there
+press left @add 5
+release left @add 5
+stable 400 5000
+key space
+key l
+key r
+stable 400 5000
+text sum
+key enter
+wait 10000 sum
+stable 700 15000
+snap previewed