about summary refs log tree commit diff stats
path: root/edit
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-01-27 15:27:29 -0800
committerKartik K. Agaram <vc@akkartik.com>2016-01-27 15:27:29 -0800
commit95425355a01edf284a86d0873e63d88071221ed8 (patch)
treeac293fa0a23a3e51c17faef4de2ebdf36fced6f0 /edit
parent5516dd288d705fed42f2c099471b19a76481b18a (diff)
downloadmu-95425355a01edf284a86d0873e63d88071221ed8.tar.gz
2608 - fix-up tests in sandbox/ app
When I first forked it from the edit/ app, I wasn't sure how to deal
with changing the recipe side when the only way the program accesses it
is with the untestable 'restore' hack. Now we introduce a little hook
into event-loop and pass in any updated recipe side directly.

In the process I've cleaned up several minor stylistic inconsistencies
between edit/ and sandbox/ apps.
Diffstat (limited to 'edit')
-rw-r--r--edit/005-sandbox.mu19
-rw-r--r--edit/006-sandbox-edit.mu8
-rw-r--r--edit/007-sandbox-delete.mu16
-rw-r--r--edit/010-warnings.mu12
4 files changed, 16 insertions, 39 deletions
diff --git a/edit/005-sandbox.mu b/edit/005-sandbox.mu
index e8f97fce..568c7cb1 100644
--- a/edit/005-sandbox.mu
+++ b/edit/005-sandbox.mu
@@ -721,9 +721,7 @@ scenario scrolling-down-on-recipe-side [
   assume-console [
     press F4
   ]
-  run [
-    event-loop screen:address:shared:screen, console:address:shared:console, 3:address:shared:programming-environment-data
-  ]
+  event-loop screen:address:shared:screen, console:address:shared:console, 3:address:shared:programming-environment-data
   # hit 'down' in recipe editor
   assume-console [
     press down-arrow
@@ -733,8 +731,7 @@ scenario scrolling-down-on-recipe-side [
     4:character/cursor <- copy 9251/␣
     print screen:address:shared:screen, 4:character/cursor
   ]
-  # sandbox editor hidden; first sandbox displayed
-  # cursor moves to first sandbox
+  # cursor moves down on recipe side
   screen-should-contain [
     .                              .
     .               ┊              .
@@ -763,11 +760,9 @@ scenario scrolling-through-multiple-sandboxes [
     type [add 1, 1]
     press F4
   ]
-  run [
-    event-loop screen:address:shared:screen, console:address:shared:console, 3:address:shared:programming-environment-data
-    4:character/cursor <- copy 9251/␣
-    print screen:address:shared:screen, 4:character/cursor
-  ]
+  event-loop screen:address:shared:screen, console:address:shared:console, 3:address:shared:programming-environment-data
+  4:character/cursor <- copy 9251/␣
+  print screen:address:shared:screen, 4:character/cursor
   screen-should-contain [
     .                              .
     .               ┊␣             .
@@ -917,9 +912,7 @@ scenario scrolling-manages-sandbox-index-correctly [
     type [add 1, 1]
     press F4
   ]
-  run [
-    event-loop screen:address:shared:screen, console:address:shared:console, 3:address:shared:programming-environment-data
-  ]
+  event-loop screen:address:shared:screen, console:address:shared:console, 3:address:shared:programming-environment-data
   screen-should-contain [
     .                              .
     .               ┊              .
diff --git a/edit/006-sandbox-edit.mu b/edit/006-sandbox-edit.mu
index 33ef2f18..de4be675 100644
--- a/edit/006-sandbox-edit.mu
+++ b/edit/006-sandbox-edit.mu
@@ -190,9 +190,7 @@ scenario editing-sandbox-after-scrolling-resets-scroll [
     press down-arrow
     press down-arrow
   ]
-  run [
-    event-loop screen:address:shared:screen, console:address:shared:console, 3:address:shared:programming-environment-data
-  ]
+  event-loop screen:address:shared:screen, console:address:shared:console, 3:address:shared:programming-environment-data
   screen-should-contain [
     .                              .
     .               ┊━━━━━━━━━━━━━━.
@@ -238,9 +236,7 @@ scenario editing-sandbox-updates-sandbox-count [
     type [add 1, 1]
     press F4
   ]
-  run [
-    event-loop screen:address:shared:screen, console:address:shared:console, 3:address:shared:programming-environment-data
-  ]
+  event-loop screen:address:shared:screen, console:address:shared:console, 3:address:shared:programming-environment-data
   screen-should-contain [
     .                              .
     .               ┊              .
diff --git a/edit/007-sandbox-delete.mu b/edit/007-sandbox-delete.mu
index a478c93f..3d6d2d12 100644
--- a/edit/007-sandbox-delete.mu
+++ b/edit/007-sandbox-delete.mu
@@ -134,9 +134,7 @@ scenario deleting-sandbox-after-scroll [
     press F4
     press down-arrow
   ]
-  run [
-    event-loop screen:address:shared:screen, console:address:shared:console, 3:address:shared:programming-environment-data
-  ]
+  event-loop screen:address:shared:screen, console:address:shared:console, 3:address:shared:programming-environment-data
   screen-should-contain [
     .                              .
     .               ┊━━━━━━━━━━━━━━.
@@ -182,9 +180,7 @@ scenario deleting-top-sandbox-after-scroll [
     press F4
     press down-arrow
   ]
-  run [
-    event-loop screen:address:shared:screen, console:address:shared:console, 3:address:shared:programming-environment-data
-  ]
+  event-loop screen:address:shared:screen, console:address:shared:console, 3:address:shared:programming-environment-data
   screen-should-contain [
     .                              .
     .               ┊━━━━━━━━━━━━━━.
@@ -231,9 +227,7 @@ scenario deleting-final-sandbox-after-scroll [
     press down-arrow
     press down-arrow
   ]
-  run [
-    event-loop screen:address:shared:screen, console:address:shared:console, 3:address:shared:programming-environment-data
-  ]
+  event-loop screen:address:shared:screen, console:address:shared:console, 3:address:shared:programming-environment-data
   screen-should-contain [
     .                              .
     .               ┊━━━━━━━━━━━━━━.
@@ -279,9 +273,7 @@ scenario deleting-updates-sandbox-count [
     type [add 1, 1]
     press F4
   ]
-  run [
-    event-loop screen:address:shared:screen, console:address:shared:console, 3:address:shared:programming-environment-data
-  ]
+  event-loop screen:address:shared:screen, console:address:shared:console, 3:address:shared:programming-environment-data
   screen-should-contain [
     .                              .
     .               ┊              .
diff --git a/edit/010-warnings.mu b/edit/010-warnings.mu
index ccecc880..c37e31e2 100644
--- a/edit/010-warnings.mu
+++ b/edit/010-warnings.mu
@@ -182,7 +182,7 @@ scenario run-updates-status-with-first-erroneous-sandbox [
   run [
     event-loop screen:address:shared:screen, console:address:shared:console, 3:address:shared:programming-environment-data
   ]
-  # status shows first sandbox with error
+  # status line shows that error is in first sandbox
   screen-should-contain [
     .  errors found (0)                                                               run (F4)           .
   ]
@@ -209,7 +209,7 @@ scenario run-updates-status-with-first-erroneous-sandbox-2 [
   run [
     event-loop screen:address:shared:screen, console:address:shared:console, 3:address:shared:programming-environment-data
   ]
-  # status shows first sandbox with error
+  # status line shows that error is in second sandbox
   screen-should-contain [
     .  errors found (1)                                                               run (F4)           .
   ]
@@ -263,9 +263,7 @@ z <- add x, [a]
   assume-console [
     press F4
   ]
-  run [
-    event-loop screen:address:shared:screen, console:address:shared:console, 3:address:shared:programming-environment-data
-  ]
+  event-loop screen:address:shared:screen, console:address:shared:console, 3:address:shared:programming-environment-data
   screen-should-contain [
     .  errors found (0)                                                               run (F4)           .
     .recipe foo x:_elem -> z:_elem [                   ┊                                                 .
@@ -489,9 +487,7 @@ recipe foo [
   assume-console [
     press F4
   ]
-  run [
-    event-loop screen:address:shared:screen, console:address:shared:console, 3:address:shared:programming-environment-data
-  ]
+  event-loop screen:address:shared:screen, console:address:shared:console, 3:address:shared:programming-environment-data
   screen-should-contain [
     .  errors found                                                                   run (F4)           .
     .                                                  ┊foo                                              .