about summary refs log tree commit diff stats
path: root/main_tests.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-07-12 18:29:00 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-07-12 20:54:50 -0700
commit3b36093553920fb2548332e983a32aa6fe218fd2 (patch)
tree72466962f6c71af141790f9b5cb1eb0abc8c322c /main_tests.lua
parent1ede1c3c6d3fc2ec8070da4c726b3fbe1bf9d374 (diff)
downloadlines.love-3b36093553920fb2548332e983a32aa6fe218fd2.tar.gz
left/right margin -> left/right coordinates
Editor state initialization now depends on window dimensions, so we have
to more carefully orchestrate startup.
Diffstat (limited to 'main_tests.lua')
-rw-r--r--main_tests.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/main_tests.lua b/main_tests.lua
index 114f3c6..0f5f675 100644
--- a/main_tests.lua
+++ b/main_tests.lua
@@ -1,8 +1,8 @@
 function test_resize_window()
   io.write('\ntest_resize_window')
   Editor_state.filename = 'foo'
-  App.screen.init{width=Editor_state.margin_left+300, height=300}
-  check_eq(App.screen.width, Editor_state.margin_left+300, 'F - test_resize_window/baseline/width')
+  App.screen.init{width=Editor_state.left+300, height=300}
+  check_eq(App.screen.width, Editor_state.left+300, 'F - test_resize_window/baseline/width')
   check_eq(App.screen.height, 300, 'F - test_resize_window/baseline/height')
   App.resize(200, 400)
   check_eq(App.screen.width, 200, 'F - test_resize_window/width')
@@ -12,7 +12,7 @@ end
 
 function test_drop_file()
   io.write('\ntest_drop_file')
-  App.screen.init{width=Editor_state.margin_left+300, height=300}
+  App.screen.init{width=Editor_state.left+300, height=300}
   App.filesystem['foo'] = 'abc\ndef\nghi\n'
   local fake_dropped_file = {
     opened = false,
@@ -39,7 +39,7 @@ end
 
 function test_drop_file_saves_previous()
   io.write('\ntest_drop_file_saves_previous')
-  App.screen.init{width=Editor_state.margin_left+300, height=300}
+  App.screen.init{width=Editor_state.left+300, height=300}
   -- initially editing a file called foo that hasn't been saved to filesystem yet
   Editor_state.lines = load_array{'abc', 'def'}
   Editor_state.filename = 'foo'