From 8fce01c15050a8c565e1d195a3b3a4ac7872db07 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 17 Jun 2017 00:07:53 -0700 Subject: 3922 --- edit/003-shortcuts.mu | 6 ++---- edit/005-sandbox.mu | 5 ++--- sandbox/003-shortcuts.mu | 6 ++---- sandbox/005-sandbox.mu | 14 ++++++++++++++ 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 -- cgit 1.4.1-2-gfad0