about summary refs log tree commit diff stats
path: root/edit/007-sandbox-delete.mu
diff options
context:
space:
mode:
Diffstat (limited to 'edit/007-sandbox-delete.mu')
-rw-r--r--edit/007-sandbox-delete.mu55
1 files changed, 25 insertions, 30 deletions
diff --git a/edit/007-sandbox-delete.mu b/edit/007-sandbox-delete.mu
index 1eb2c904..141c1528 100644
--- a/edit/007-sandbox-delete.mu
+++ b/edit/007-sandbox-delete.mu
@@ -1,11 +1,10 @@
 ## deleting sandboxes
 
 scenario deleting-sandboxes [
+  local-scope
   trace-until 100/app  # trace too long
   assume-screen 100/width, 15/height
-  1:text <- new []
-  2:text <- new []
-  3:&:environment <- new-programming-environment screen:&:screen, 1:text, 2:text
+  env:&:environment <- new-programming-environment screen:&:screen, [], []
   # run a few commands
   assume-console [
     left-click 1, 80
@@ -14,7 +13,7 @@ scenario deleting-sandboxes [
     type [add 2, 2]
     press F4
   ]
-  event-loop screen:&:screen, console:&:console, 3:&:environment
+  event-loop screen:&:screen, console:&:console, env
   screen-should-contain [
     .                                                                                 run (F4)           .
     .                                                  ┊                                                 .
@@ -35,7 +34,7 @@ scenario deleting-sandboxes [
     left-click 7, 85
   ]
   run [
-    event-loop screen:&:screen, console:&:console, 3:&:environment
+    event-loop screen:&:screen, console:&:console, env
   ]
   screen-should-contain [
     .                                                                                 run (F4)           .
@@ -53,7 +52,7 @@ scenario deleting-sandboxes [
     left-click 3, 99
   ]
   run [
-    event-loop screen:&:screen, console:&:console, 3:&:environment
+    event-loop screen:&:screen, console:&:console, env
   ]
   screen-should-contain [
     .                                                                                 run (F4)           .
@@ -148,13 +147,12 @@ def delete-sandbox env:&:environment, sandbox:&:sandbox -> env:&:environment [
 ]
 
 scenario deleting-sandbox-after-scroll [
+  local-scope
   trace-until 100/app  # trace too long
   assume-screen 100/width, 10/height
   # initialize environment
-  1:text <- new []
-  2:text <- new []
-  3:&:environment <- new-programming-environment screen:&:screen, 1:text, 2:text
-  render-all screen, 3:&:environment, render
+  env:&:environment <- new-programming-environment screen:&:screen, [], []
+  render-all screen, env, render
   # create 2 sandboxes and scroll to second
   assume-console [
     press ctrl-n
@@ -164,7 +162,7 @@ scenario deleting-sandbox-after-scroll [
     press F4
     press page-down
   ]
-  event-loop screen:&:screen, console:&:console, 3:&:environment
+  event-loop screen:&:screen, console:&:console, env
   screen-should-contain [
     .                                                                                 run (F4)           .
     .                                                  ┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
@@ -179,7 +177,7 @@ scenario deleting-sandbox-after-scroll [
     left-click 6, 99
   ]
   run [
-    event-loop screen:&:screen, console:&:console, 3:&:environment
+    event-loop screen:&:screen, console:&:console, env
   ]
   # second sandbox shows in editor; scroll resets to display first sandbox
   screen-should-contain [
@@ -194,13 +192,12 @@ scenario deleting-sandbox-after-scroll [
 ]
 
 scenario deleting-top-sandbox-after-scroll [
+  local-scope
   trace-until 100/app  # trace too long
   assume-screen 100/width, 10/height
   # initialize environment
-  1:text <- new []
-  2:text <- new []
-  3:&:environment <- new-programming-environment screen:&:screen, 1:text, 2:text
-  render-all screen, 3:&:environment, render
+  env:&:environment <- new-programming-environment screen:&:screen, [], []
+  render-all screen, env, render
   # create 2 sandboxes and scroll to second
   assume-console [
     press ctrl-n
@@ -210,7 +207,7 @@ scenario deleting-top-sandbox-after-scroll [
     press F4
     press page-down
   ]
-  event-loop screen:&:screen, console:&:console, 3:&:environment
+  event-loop screen:&:screen, console:&:console, env
   screen-should-contain [
     .                                                                                 run (F4)           .
     .                                                  ┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
@@ -225,7 +222,7 @@ scenario deleting-top-sandbox-after-scroll [
     left-click 2, 99
   ]
   run [
-    event-loop screen:&:screen, console:&:console, 3:&:environment
+    event-loop screen:&:screen, console:&:console, env
   ]
   # second sandbox shows in editor; scroll resets to display first sandbox
   screen-should-contain [
@@ -240,13 +237,12 @@ scenario deleting-top-sandbox-after-scroll [
 ]
 
 scenario deleting-final-sandbox-after-scroll [
+  local-scope
   trace-until 100/app  # trace too long
   assume-screen 100/width, 10/height
   # initialize environment
-  1:text <- new []
-  2:text <- new []
-  3:&:environment <- new-programming-environment screen:&:screen, 1:text, 2:text
-  render-all screen, 3:&:environment, render
+  env:&:environment <- new-programming-environment screen:&:screen, [], []
+  render-all screen, env, render
   # create 2 sandboxes and scroll to second
   assume-console [
     press ctrl-n
@@ -257,7 +253,7 @@ scenario deleting-final-sandbox-after-scroll [
     press page-down
     press page-down
   ]
-  event-loop screen:&:screen, console:&:console, 3:&:environment
+  event-loop screen:&:screen, console:&:console, env
   screen-should-contain [
     .                                                                                 run (F4)           .
     .                                                  ┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
@@ -272,7 +268,7 @@ scenario deleting-final-sandbox-after-scroll [
     left-click 2, 99
   ]
   run [
-    event-loop screen:&:screen, console:&:console, 3:&:environment
+    event-loop screen:&:screen, console:&:console, env
   ]
   # implicitly scroll up to first sandbox
   screen-should-contain [
@@ -288,13 +284,12 @@ scenario deleting-final-sandbox-after-scroll [
 ]
 
 scenario deleting-updates-sandbox-count [
+  local-scope
   trace-until 100/app  # trace too long
   assume-screen 100/width, 10/height
   # initialize environment
-  1:text <- new []
-  2:text <- new []
-  3:&:environment <- new-programming-environment screen:&:screen, 1:text, 2:text
-  render-all screen, 3:&:environment, render
+  env:&:environment <- new-programming-environment screen:&:screen, [], []
+  render-all screen, env, render
   # create 2 sandboxes
   assume-console [
     press ctrl-n
@@ -303,7 +298,7 @@ scenario deleting-updates-sandbox-count [
     type [add 1, 1]
     press F4
   ]
-  event-loop screen:&:screen, console:&:console, 3:&:environment
+  event-loop screen:&:screen, console:&:console, env
   screen-should-contain [
     .                                                                                 run (F4)           .
     .                                                  ┊                                                 .
@@ -323,7 +318,7 @@ scenario deleting-updates-sandbox-count [
     press page-down
   ]
   run [
-    event-loop screen:&:screen, console:&:console, 3:&:environment
+    event-loop screen:&:screen, console:&:console, env
   ]
   # shouldn't go past last sandbox
   screen-should-contain [
41'>441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592