summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/snapshots/filewatch.golden31
-rw-r--r--test/snapshots/filewatch.snap19
2 files changed, 9 insertions, 41 deletions
diff --git a/test/snapshots/filewatch.golden b/test/snapshots/filewatch.golden
index f19168b1..589cfc3a 100644
--- a/test/snapshots/filewatch.golden
+++ b/test/snapshots/filewatch.golden
@@ -28,20 +28,8 @@
| 7 line 7
| 8 line 8
| 9
-== snap reloaded grid=210x31 cursor=15,7
-|6: /tmp/pardes-snap/filewatch/cwd/w.txt Save Tty Collapse Del
-|7: 1 EXTERNAL --:--:-- reloaded /tmp/pardes-snap/filewatch/cwd/w.txt
-|8: 2
-|9:
-|10:
-|11:
-|12:
-|13:
-|14:
-|15:
-|16:
-|17:
-|18:
+== snap kept grid=210x31 cursor=15,7
+|7: 1 liMYEDITne 1 /tmp/pardes-snap/filewatch/cwd/w.txt changed on disk (get reloads it, Save overwrites it)
== snap reloaded_sub grid=210x31 cursor=15,7
|20: 1 RENAMED --:--:-- reloaded /tmp/pardes-snap/filewatch/cwd/sub/s.txt
|21: 2
@@ -52,18 +40,3 @@
|26:
|27:
|28:
-== snap undone grid=210x31 cursor=15,7
-|6: * /tmp/pardes-snap/filewatch/cwd/w.txt Save Tty Collapse Del
-|7: 1 liMYEDITne 1
-|8: 2 line 2
-|9: 3 /tmp/pardes-snap/filewatch/cwd/sub/s.txt
-|10: 4 line 4
-|11: 5 line 5
-|12: 6 line 6
-|13: 7 line 7
-|14: 8 line 8
-|15: 9 line 9
-|16: 10 line 10
-|17: 11 line 11
-|18: 12 line 12
-|20: 1 RENAMED
diff --git a/test/snapshots/filewatch.snap b/test/snapshots/filewatch.snap
index 9e6e6a13..6664519f 100644
--- a/test/snapshots/filewatch.snap
+++ b/test/snapshots/filewatch.snap
@@ -1,6 +1,6 @@
-# external file updates: a write from outside pardes lands in the open pane,
-# and Undo brings the unsaved edit back. That is the whole contract — the
-# update is committed like any other edit, so nothing has to be merged.
+# external file updates: a write from outside pardes lands in an open pane
+# that has no unsaved edits, committed like any other edit; a pane WITH
+# unsaved edits keeps them and says the file changed on disk (File.changed).
#
# The writer must be a STRANGER to the editor. This script used to have a
# pardes PANE run the write, which proved much less than it looked: that
@@ -54,18 +54,13 @@ settle 100
stable 400 5000
snap edited
# ---- from here to `snap reloaded_sub`, pardes is sent NOTHING ----
+# w.txt has the unsaved edit: it is kept, and the change is said
run printf 'EXTERNAL\n' > w.txt
-wait 10000 EXTERNAL
+wait 10000 changed on disk
stable 700 10000
-snap reloaded
+snap kept
+# sub/s.txt has none: it takes the new text
run printf 'RENAMED\n' > sub/t && mv sub/t sub/s.txt
wait 10000 RENAMED
stable 700 10000
snap reloaded_sub
-# back in the file pane: one undo and the unsaved edit is there again
-press left 10 8
-release left 10 8
-stable 400 5000
-key u
-stable 400 5000
-snap undone