about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--edit/003-shortcuts.mu6
-rw-r--r--edit/005-sandbox.mu5
-rw-r--r--sandbox/003-shortcuts.mu6
-rw-r--r--sandbox/005-sandbox.mu14
4 files changed, 20 insertions, 11 deletions
diff --git a/edit/003-shortcuts.mu b/edit/003-shortcuts.mu
index f783c06d..87a6f784 100644
--- a/edit/003-shortcuts.mu
+++ b/edit/003-shortcuts.mu
@@ -30,8 +30,7 @@ cd]
 scenario editor-inserts-two-spaces-and-wraps-line-on-tab [
   local-scope
   assume-screen 10/width, 5/height
-  s:text <- new [abcd]
-  e:&:editor <- new-editor s, 0/left, 5/right
+  e:&:editor <- new-editor [abcd], 0/left, 5/right
   editor-render screen, e
   $clear-trace
   assume-console [
@@ -1178,8 +1177,7 @@ ghi]
 scenario editor-moves-to-top-line-in-presence-of-wrapped-line [
   local-scope
   assume-screen 10/width, 5/height
-  s:text <- new [abcde]
-  e:&:editor <- new-editor s, 0/left, 5/right
+  e:&:editor <- new-editor [abcde], 0/left, 5/right
   editor-render screen, e
   screen-should-contain [
     .          .
diff --git a/edit/005-sandbox.mu b/edit/005-sandbox.mu
index e58b6d47..4ef76e01 100644
--- a/edit/005-sandbox.mu
+++ b/edit/005-sandbox.mu
@@ -425,12 +425,11 @@ def render-text screen:&:screen, s:text, left:num, right:num, color:num, row:num
   move-cursor screen, row, left
 ]
 
-scenario read-text-wraps-barely-long-lines [
+scenario render-text-wraps-barely-long-lines [
   local-scope
   assume-screen 5/width, 5/height
-  s:text <- new [abcde]
   run [
-    render-text screen, s, 0/left, 4/right, 7/white, 1/row
+    render-text screen, [abcde], 0/left, 4/right, 7/white, 1/row
   ]
   screen-should-contain [
     .     .
diff --git a/sandbox/003-shortcuts.mu b/sandbox/003-shortcuts.mu
index 1351c4f8..b019d97c 100644
--- a/sandbox/003-shortcuts.mu
+++ b/sandbox/003-shortcuts.mu
@@ -30,8 +30,7 @@ cd]
 scenario editor-inserts-two-spaces-and-wraps-line-on-tab [
   local-scope
   assume-screen 10/width, 5/height
-  s:text <- new [abcd]
-  e:&:editor <- new-editor s, 0/left, 5/right
+  e:&:editor <- new-editor [abcd], 0/left, 5/right
   editor-render screen, e
   $clear-trace
   assume-console [
@@ -1165,8 +1164,7 @@ ghi]
 scenario editor-moves-to-top-line-in-presence-of-wrapped-line [
   local-scope
   assume-screen 10/width, 5/height
-  s:text <- new [abcde]
-  e:&:editor <- new-editor s, 0/left, 5/right
+  e:&:editor <- new-editor [abcde], 0/left, 5/right
   editor-render screen, e
   screen-should-contain [
     .          .
diff --git a/sandbox/005-sandbox.mu b/sandbox/005-sandbox.mu
index c1495920..907be769 100644
--- a/sandbox/005-sandbox.mu
+++ b/sandbox/005-sandbox.mu
@@ -405,6 +405,20 @@ def render-text screen:&:screen, s:text, left:num, right:num, color:num, row:num
   move-cursor screen, row, left
 ]
 
+scenario render-text-wraps-barely-long-lines [
+  local-scope
+  assume-screen 5/width, 5/height
+  run [
+    render-text screen, [abcde], 0/left, 4/right, 7/white, 1/row
+  ]
+  screen-should-contain [
+    .     .
+    .abcd↩.
+    .e    .
+    .     .
+  ]
+]
+
 # assumes programming environment has no sandboxes; restores them from previous session
 def restore-sandboxes env:&:environment, resources:&:resources -> env:&:environment [
   local-scope
uot;1", value: 1, type: 0, properties: ["1": "literal"]}, {name: "12", value: 12, type: 1, properties: ["12": "integer"]} run/0: ingredient 0 is 1 run/0: ingredient 1 is 12 mem/0: location 12 is 2 run/0: product 0 is 3 mem/0: storing 3 in location 13 run/0: instruction f/2 run/0: reply/33 {name: "12", value: 12, type: 1, properties: ["12": "integer"]}, {name: "13", value: 13, type: 1, properties: ["13": "integer"]} mem/0: location 12 is 2 mem/0: location 13 is 3 run/0: result 0 is 2 mem/0: storing 2 in location 3 run/0: result 1 is 3 mem/0: storing 3 in location 4