blob: 88d6a1b95b617c795c9655f71ae5b216718b5145 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
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.local'
require 'definition.arg'
|