diff options
Diffstat (limited to 'test/definition')
-rw-r--r-- | test/definition/arg.lua | 23 | ||||
-rw-r--r-- | test/definition/bug.lua | 15 | ||||
-rw-r--r-- | test/definition/function.lua | 24 | ||||
-rw-r--r-- | test/definition/init.lua | 22 | ||||
-rw-r--r-- | test/definition/local.lua | 191 | ||||
-rw-r--r-- | test/definition/set.lua | 30 | ||||
-rw-r--r-- | test/definition/table.lua | 6 |
7 files changed, 0 insertions, 311 deletions
diff --git a/test/definition/arg.lua b/test/definition/arg.lua deleted file mode 100644 index 2004d666..00000000 --- a/test/definition/arg.lua +++ /dev/null @@ -1,23 +0,0 @@ -TEST [[ -local function xx (<!xx!>) - <?xx?> = 1 -end -]] - -TEST [[ -local function x (x, <!...!>) - x = <?...?> -end -]] - -TEST [[ -function mt<!:!>x() - <?self?> = 1 -end -]] - -TEST [[ -function mt:x(<!self!>) - <?self?> = 1 -end -]] diff --git a/test/definition/bug.lua b/test/definition/bug.lua deleted file mode 100644 index b0e890ca..00000000 --- a/test/definition/bug.lua +++ /dev/null @@ -1,15 +0,0 @@ -TEST [[ -local <!x!> -function _(x) -end -function _() - <?x?> -end -]] - -TEST [[ -function _(<!x!>) - do return end - <?x?> = 1 -end -]] diff --git a/test/definition/function.lua b/test/definition/function.lua deleted file mode 100644 index 1ef6a463..00000000 --- a/test/definition/function.lua +++ /dev/null @@ -1,24 +0,0 @@ - -TEST [[ -function <!x!> () end -<?x?> = 1 -]] - -TEST [[ -local function <!x!> () end -<?x?> = 1 -]] - -TEST [[ -local x -local function <!x!> () - <?x?> = 1 -end -]] - -TEST [[ -local <!x!> -function x() -end -<?x?> = 1 -]] diff --git a/test/definition/init.lua b/test/definition/init.lua deleted file mode 100644 index 9bd7a1d8..00000000 --- a/test/definition/init.lua +++ /dev/null @@ -1,22 +0,0 @@ -local matcher = require 'matcher' - -rawset(_G, 'TEST', true) - -function TEST(script) - local start = script:find('<!', 1, true) + 2 - local finish = script:find('!>', 1, true) - 1 - local pos = script:find('<?', 1, true) + 2 - local new_script = script:gsub('<[!?]', ' '):gsub('[!?]>', ' ') - - local suc, a, b = matcher.definition(new_script, pos) - assert(suc) - assert(a == start) - assert(b == finish) -end - -require 'definition.set' -require 'definition.local' -require 'definition.arg' -require 'definition.function' ---require 'definition.table' -require 'definition.bug' diff --git a/test/definition/local.lua b/test/definition/local.lua deleted file mode 100644 index 0737443d..00000000 --- a/test/definition/local.lua +++ /dev/null @@ -1,191 +0,0 @@ -TEST [[ -local <!x!> -<?x?> = 1 -]] - -TEST [[ -local z, y, <!x!> -<?x?> = 1 -]] - -TEST [[ -local <!x!> = 1 -<?x?> = 1 -]] - -TEST [[ -local z, y, <!x!> = 1 -<?x?> = 1 -]] - -TEST [[ -local x -local <!x!> -<?x?> = 1 -]] - -TEST [[ -local <!x!> -do - <?x?> = 1 -end -]] - -TEST [[ -local <!x!> -do - local x -end -<?x?> = 1 -]] - -TEST [[ -local <!x!> -if <?x?> then - local x -end -]] - -TEST [[ -local <!x!> -if x then - local x -elseif <?x?> then - local x -end -]] - -TEST [[ -local <!x!> -if x then - local x -elseif x then - local x -else - local x -end -<?x?> = 1 -]] - -TEST [[ -local <!x!> -if x then - <?x?> = 1 -elseif x then - local x -else - local x -end -]] - -TEST [[ -local <!x!> -for x = 1, 10 do -end -<?x?> = 1 -]] - -TEST [[ -local x -for <!x!> = 1, 10 do - <?x?> = 1 -end -]] - -TEST [[ -local <!x!> -for x in x do -end -<?x?> = 1 -]] - -TEST [[ -local <!x!> -for x in <?x?> do -end -]] - -TEST [[ -local x -for <!x!> in x do - <?x?> = 1 -end -]] - -TEST [[ -local x -for z, y, <!x!> in x do - <?x?> = 1 -end -]] - -TEST [[ -local <!x!> -while <?x?> do -end -]] - -TEST [[ -local <!x!> -while x do - <?x?> = 1 -end -]] - -TEST [[ -local <!x!> -while x do - local x -end -<?x?> = 1 -]] - -TEST [[ -local <!x!> -repeat - <?x?> = 1 -until true -]] - -TEST [[ -local <!x!> -repeat - local x -until true -<?x?> = 1 -]] - -TEST [[ -local <!x!> -repeat -until <?x?> -]] - -TEST [[ -local x -repeat - local <!x!> -until <?x?> -]] - -TEST [[ -local <!x!> -function _() - local x -end -<?x?> = 1 -]] - -TEST [[ -local <!x!> -return function () - <?x?> = 1 -end -]] - -TEST [[ -local <!x!> -local x = function () - <?x?> = 1 -end -]] diff --git a/test/definition/set.lua b/test/definition/set.lua deleted file mode 100644 index 2e48e490..00000000 --- a/test/definition/set.lua +++ /dev/null @@ -1,30 +0,0 @@ -TEST [[ -<!x!> = 1 -<?x?> = 1 -]] - -TEST [[ -do - <!global!> = 1 -end -<?global?> = 1 -]] - -TEST [[ -<!x!> = 1 -do - local x = 1 -end -<?x?> = 1 -]] - -TEST [[ -x = 1 -do - local <!x!> = 1 - do - x = 2 - end - <?x?> = 1 -end -]] diff --git a/test/definition/table.lua b/test/definition/table.lua deleted file mode 100644 index 13a3b555..00000000 --- a/test/definition/table.lua +++ /dev/null @@ -1,6 +0,0 @@ -TEST [[ -local t = { - <!x!> = 1, -} -t.<?x?> = 1 -]] |