summaryrefslogtreecommitdiff
path: root/ThirdParty/tolua_runtime/luajit-2.1/src/x64/test/unit/ffi/test_line_directive.lua
blob: a8b0403cba9d2c0efee8ef5e68d92a6f01366839 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
local x = [=[
local ffi = require "ffi"

ffi.cdef [[
    #line 100
    typedef Int xxx
]]
]=]

local function foo()
    loadstring(x)()
end

local r, e = pcall(foo)
assert(string.find(e, "declaration specifier expected near 'Int' at line 100") ~= nil)