diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/crossfile/infer.lua | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/crossfile/infer.lua b/test/crossfile/infer.lua index 0b458e5f..de29007b 100644 --- a/test/crossfile/infer.lua +++ b/test/crossfile/infer.lua @@ -133,3 +133,33 @@ print(<?X?>) ]], }, infer = 'boolean|integer', } + +TEST { + { path = 'a.lua', content = [[ +return 1337, "string", true +]], }, + { path = 'b.lua', content = [[ +local <?a?>, b, c = require 'a +]], }, + infer = 'integer', +} + +TEST { + { path = 'a.lua', content = [[ +return 1337, "string", true +]], }, + { path = 'b.lua', content = [[ +local a, <?b?>, c = require 'a +]], }, + infer = 'unknown', +} + +TEST { + { path = 'a.lua', content = [[ +return 1337, "string", true +]], }, + { path = 'b.lua', content = [[ +local a, b, <?c?> = require 'a +]], }, + infer = 'nil', +} |