Browse Source

Add test for Font:getLines;

bjorn 1 year ago
parent
commit
a427cb0466
1 changed files with 9 additions and 0 deletions
  1. 9 0
      tests/font.lua

+ 9 - 0
tests/font.lua

@@ -0,0 +1,9 @@
+function lovr.load()
+  font = lovr.graphics.getDefaultFont()
+  local lines = font:getLines({ 0xff0000, 'hello ', 0x0000ff, 'world' }, 0)
+  assert(#lines == 2)
+  assert(lines[1] == 'hello ')
+  assert(lines[2] == 'world')
+end
+
+lovr.event.quit()