about summary refs log tree commit diff stats
path: root/apps/tile/gap-buffer.mu
Commit message (Expand)AuthorAgeFilesLines
* 7159 - explicitly use 'return' everywhereKartik Agaram2020-11-021-55/+56
* 7115Kartik Agaram2020-10-261-1/+1
* 7098 - tile: string valuesKartik Agaram2020-10-251-0/+18
* tile: process space in middle of wordKartik Agaram2020-10-241-0/+6
* 7080Kartik Agaram2020-10-201-0/+10
* 7079Kartik Agaram2020-10-191-0/+18
* 6860Kartik Agaram2020-09-261-0/+7
* 6837Kartik Agaram2020-09-221-160/+0
* 6821 - highlight words clobbered by the next wordKartik Agaram2020-09-201-0/+34
* 6814 - tile: backspace deletes char or wordKartik Agaram2020-09-191-0/+6
* 6812 - tile: render cursor locationKartik Agaram2020-09-191-1/+7
* 6811 - tile: left-cursor movementKartik Agaram2020-09-191-0/+12
* 6807 - tile: render intermediate stack stateKartik Agaram2020-09-191-4/+50
* 6801 - snapshot: RPN structured editorKartik Agaram2020-09-191-37/+219
* 6796Kartik Agaram2020-09-161-14/+34
* 6789 - tile: print keystrokes to screenKartik Agaram2020-09-161-0/+137
e/commit/test.lua?id=a8a8965b1b313acb7a5d7395aa72c68348e0ddb2'>a8a8965 ^
f421e1d ^






1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
                             

                      
               



              
                          
                  



                                                   
                                   
                             
                                                                







                                             
                             



                           
                             






                    
-- Some primitives for tests.

function check(x, msg)
  if not x then
    error(msg)
  end
end

function check_nil(x, msg)
  if x ~= nil then
    error(msg..'; should be nil but got "'..x..'"')
  end
end

function check_eq(x, expected, msg)
  if not eq(x, expected) then
    error(msg..'; should be "'..expected..'" but got "'..x..'"')
  end
end

function eq(a, b)
  if type(a) ~= type(b) then return false end
  if type(a) == 'table' then
    if #a ~= #b then return false end
    for k, v in pairs(a) do
      if not eq(b[k], v) then
        return false
      end
    end
    for k, v in pairs(b) do
      if not eq(a[k], v) then
        return false
      end
    end
    return true
  end
  return a == b
end