about summary refs log tree commit diff stats
path: root/edit/007-sandbox-delete.mu
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-05-19 10:43:09 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-05-19 10:43:09 -0700
commitdd30f56dbebc54957a87d100a53415de743c7f57 (patch)
tree7ee31d03668118f036e4c84e25061905d05c647d /edit/007-sandbox-delete.mu
parent5d53e7d0c402ac6a5a928c0de9fd168ca6750f6e (diff)
downloadmu-dd30f56dbebc54957a87d100a53415de743c7f57.tar.gz
2977 - draw new sandbox menu in edit/
Doesn't work as advertised yet. This is just the render piece, and
fixing all the tests.

I've been careful to try to break tests for edit once I implement the
button. Delete I can't ensure will break afterwards. Remember to test
clicking on multiple places on the menu.

Managing the screens is starting to grow onerous; maybe we need
something called normalize which clears some things. But the sandbox
menu can be on arbitrary lines..
Diffstat (limited to 'edit/007-sandbox-delete.mu')
-rw-r--r--edit/007-sandbox-delete.mu142
1 files changed, 71 insertions, 71 deletions
diff --git a/edit/007-sandbox-delete.mu b/edit/007-sandbox-delete.mu
index 4f77f205..a758e663 100644
--- a/edit/007-sandbox-delete.mu
+++ b/edit/007-sandbox-delete.mu
@@ -19,11 +19,11 @@ scenario deleting-sandboxes [
     .                                                                                 run (F4)           .
     .                                                  ┊                                                 .
     .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
-    .                                                  ┊0                                               x.
+    .                                                  ┊0   edit          copy            delete         .
     .                                                  ┊add 2, 2                                         .
     .                                                  ┊4                                                .
     .                                                  ┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
-    .                                                  ┊1                                               x.
+    .                                                  ┊1   edit          copy            delete         .
     .                                                  ┊divide-with-remainder 11, 3                      .
     .                                                  ┊3                                                .
     .                                                  ┊2                                                .
@@ -41,7 +41,7 @@ scenario deleting-sandboxes [
     .                                                                                 run (F4)           .
     .                                                  ┊                                                 .
     .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
-    .                                                  ┊0                                               x.
+    .                                                  ┊0   edit          copy            delete         .
     .                                                  ┊add 2, 2                                         .
     .                                                  ┊4                                                .
     .                                                  ┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
@@ -140,7 +140,7 @@ def fixup-delete env:address:programming-environment-data, next:address:sandbox-
 
 scenario deleting-sandbox-after-scroll [
   trace-until 100/app  # trace too long
-  assume-screen 30/width, 10/height
+  assume-screen 100/width, 10/height
   # initialize environment
   1:address:array:character <- new []
   2:address:array:character <- new []
@@ -157,36 +157,36 @@ scenario deleting-sandbox-after-scroll [
   ]
   event-loop screen:address:screen, console:address:console, 3:address:programming-environment-data
   screen-should-contain [
-    .                              .
-    .               ┊━━━━━━━━━━━━━━.
-    .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊0            x.
-    .               ┊add 1, 1      .
-    .               ┊2             .
-    .               ┊━━━━━━━━━━━━━━.
-    .               ┊1            x.
+    .                                                                                 run (F4)           .
+    .                                                  ┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
+    .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊0   edit          copy            delete         .
+    .                                                  ┊add 1, 1                                         .
+    .                                                  ┊2                                                .
+    .                                                  ┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
+    .                                                  ┊1   edit          copy            delete         .
   ]
   # delete the second sandbox
   assume-console [
-    left-click 6, 29
+    left-click 6, 99
   ]
   run [
     event-loop screen:address:screen, console:address:console, 3:address:programming-environment-data
   ]
   # second sandbox shows in editor; scroll resets to display first sandbox
   screen-should-contain [
-    .                              .
-    .               ┊━━━━━━━━━━━━━━.
-    .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊0            x.
-    .               ┊add 1, 1      .
-    .               ┊2             .
-    .               ┊━━━━━━━━━━━━━━.
-    .               ┊              .
+    .                                                                                 run (F4)           .
+    .                                                  ┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
+    .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊0   edit          copy            delete         .
+    .                                                  ┊add 1, 1                                         .
+    .                                                  ┊2                                                .
+    .                                                  ┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
+    .                                                  ┊                                                 .
   ]
 ]
 
 scenario deleting-top-sandbox-after-scroll [
   trace-until 100/app  # trace too long
-  assume-screen 30/width, 10/height
+  assume-screen 100/width, 10/height
   # initialize environment
   1:address:array:character <- new []
   2:address:array:character <- new []
@@ -203,36 +203,36 @@ scenario deleting-top-sandbox-after-scroll [
   ]
   event-loop screen:address:screen, console:address:console, 3:address:programming-environment-data
   screen-should-contain [
-    .                              .
-    .               ┊━━━━━━━━━━━━━━.
-    .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊0            x.
-    .               ┊add 1, 1      .
-    .               ┊2             .
-    .               ┊━━━━━━━━━━━━━━.
-    .               ┊1            x.
+    .                                                                                 run (F4)           .
+    .                                                  ┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
+    .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊0   edit          copy            delete         .
+    .                                                  ┊add 1, 1                                         .
+    .                                                  ┊2                                                .
+    .                                                  ┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
+    .                                                  ┊1   edit          copy            delete         .
   ]
   # delete the second sandbox
   assume-console [
-    left-click 2, 29
+    left-click 2, 99
   ]
   run [
     event-loop screen:address:screen, console:address:console, 3:address:programming-environment-data
   ]
   # second sandbox shows in editor; scroll resets to display first sandbox
   screen-should-contain [
-    .                              .
-    .               ┊━━━━━━━━━━━━━━.
-    .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊0            x.
-    .               ┊add 2, 2      .
-    .               ┊4             .
-    .               ┊━━━━━━━━━━━━━━.
-    .               ┊              .
+    .                                                                                 run (F4)           .
+    .                                                  ┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
+    .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊0   edit          copy            delete         .
+    .                                                  ┊add 2, 2                                         .
+    .                                                  ┊4                                                .
+    .                                                  ┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
+    .                                                  ┊                                                 .
   ]
 ]
 
 scenario deleting-final-sandbox-after-scroll [
   trace-until 100/app  # trace too long
-  assume-screen 30/width, 10/height
+  assume-screen 100/width, 10/height
   # initialize environment
   1:address:array:character <- new []
   2:address:array:character <- new []
@@ -250,37 +250,37 @@ scenario deleting-final-sandbox-after-scroll [
   ]
   event-loop screen:address:screen, console:address:console, 3:address:programming-environment-data
   screen-should-contain [
-    .                              .
-    .               ┊━━━━━━━━━━━━━━.
-    .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊1            x.
-    .               ┊add 2, 2      .
-    .               ┊4             .
-    .               ┊━━━━━━━━━━━━━━.
-    .               ┊              .
+    .                                                                                 run (F4)           .
+    .                                                  ┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
+    .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊1   edit          copy            delete         .
+    .                                                  ┊add 2, 2                                         .
+    .                                                  ┊4                                                .
+    .                                                  ┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
+    .                                                  ┊                                                 .
   ]
   # delete the second sandbox
   assume-console [
-    left-click 2, 29
+    left-click 2, 99
   ]
   run [
     event-loop screen:address:screen, console:address:console, 3:address:programming-environment-data
   ]
   # implicitly scroll up to first sandbox
   screen-should-contain [
-    .                              .
-    .               ┊              .
-    .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊━━━━━━━━━━━━━━.
-    .               ┊0            x.
-    .               ┊add 1, 1      .
-    .               ┊2             .
-    .               ┊━━━━━━━━━━━━━━.
-    .               ┊              .
+    .                                                                                 run (F4)           .
+    .                                                  ┊                                                 .
+    .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
+    .                                                  ┊0   edit          copy            delete         .
+    .                                                  ┊add 1, 1                                         .
+    .                                                  ┊2                                                .
+    .                                                  ┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
+    .                                                  ┊                                                 .
   ]
 ]
 
 scenario deleting-updates-sandbox-count [
   trace-until 100/app  # trace too long
-  assume-screen 30/width, 10/height
+  assume-screen 100/width, 10/height
   # initialize environment
   1:address:array:character <- new []
   2:address:array:character <- new []
@@ -296,20 +296,20 @@ scenario deleting-updates-sandbox-count [
   ]
   event-loop screen:address:screen, console:address:console, 3:address:programming-environment-data
   screen-should-contain [
-    .                              .
-    .               ┊              .
-    .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊━━━━━━━━━━━━━━.
-    .               ┊0            x.
-    .               ┊add 1, 1      .
-    .               ┊2             .
-    .               ┊━━━━━━━━━━━━━━.
-    .               ┊1            x.
-    .               ┊add 2, 2      .
-    .               ┊4             .
+    .                                                                                 run (F4)           .
+    .                                                  ┊                                                 .
+    .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
+    .                                                  ┊0   edit          copy            delete         .
+    .                                                  ┊add 1, 1                                         .
+    .                                                  ┊2                                                .
+    .                                                  ┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
+    .                                                  ┊1   edit          copy            delete         .
+    .                                                  ┊add 2, 2                                         .
+    .                                                  ┊4                                                .
   ]
   # delete the second sandbox, then try to scroll down twice
   assume-console [
-    left-click 3, 29
+    left-click 3, 99
     press page-down
     press page-down
   ]
@@ -318,12 +318,12 @@ scenario deleting-updates-sandbox-count [
   ]
   # shouldn't go past last sandbox
   screen-should-contain [
-    .                              .
-    .               ┊━━━━━━━━━━━━━━.
-    .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊0            x.
-    .               ┊add 2, 2      .
-    .               ┊4             .
-    .               ┊━━━━━━━━━━━━━━.
-    .               ┊              .
+    .                                                                                 run (F4)           .
+    .                                                  ┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
+    .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊0   edit          copy            delete         .
+    .                                                  ┊add 2, 2                                         .
+    .                                                  ┊4                                                .
+    .                                                  ┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
+    .                                                  ┊                                                 .
   ]
 ]