diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-06-26 00:02:29 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-06-26 00:02:29 -0700 |
commit | cc9c70012c470fffc87aba612d767c135f61d860 (patch) | |
tree | b72e82588560b398ff2118fbbe1c91ca8ceaf2e9 | |
parent | b0ffd5ffe3d11f561f0ad388988211626068ec8d (diff) | |
download | mu-cc9c70012c470fffc87aba612d767c135f61d860.tar.gz |
1665
-rw-r--r-- | edit.mu | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/edit.mu b/edit.mu index d4d8c0da..4b2d6935 100644 --- a/edit.mu +++ b/edit.mu @@ -727,6 +727,35 @@ d] ] ] +scenario editor-wraps-line-on-insert [ + assume-screen 5:literal/width, 3:literal/height + assume-console [ + type [e] + ] + run [ + 1:address:array:character <- new [abcd] + 2:address:editor-data <- new-editor 1:address:array:character, screen:address, 0:literal/top, 0:literal/left, 5:literal/right + event-loop screen:address, console:address, 2:address:editor-data + ] + screen-should-contain [ + # no wrap yet + .eabcd. + . . + ] + assume-console [ + type [f] + ] + run [ + event-loop screen:address, console:address, 2:address:editor-data + ] + screen-should-contain [ + # now wrap + .efab↩. + .cd . + . . + ] +] + scenario editor-moves-cursor-after-inserting-characters [ assume-screen 10:literal/width, 5:literal/height assume-console [ |