diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-11-20 15:24:29 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-11-20 15:24:29 +0800 |
commit | 50523d92c56de6eead73629b60916d9b9b892204 (patch) | |
tree | 962d59a0d9f95fa969f01cd7cc673ce495f549f2 /test | |
parent | d7df0e0f687f7497e78bef86575b395e0f4959dd (diff) | |
download | lua-language-server-50523d92c56de6eead73629b60916d9b9b892204.zip |
重构转到实现的逻辑分支判断
Diffstat (limited to 'test')
-rw-r--r-- | test/implementation/if.lua | 28 | ||||
-rw-r--r-- | test/implementation/local.lua | 10 |
2 files changed, 30 insertions, 8 deletions
diff --git a/test/implementation/if.lua b/test/implementation/if.lua index a9ab8b22..0da8be1a 100644 --- a/test/implementation/if.lua +++ b/test/implementation/if.lua @@ -69,10 +69,10 @@ end ]] TEST [[ -x = 1 +x3 = 1 repeat - <!x!> = 1 -until <?x?> == 1 + <!x3!> = 1 +until <?x3?> == 1 ]] TEST [[ @@ -82,3 +82,25 @@ repeat until 1 <?x?> = 1 ]] + +TEST [[ +<!x!> = 1 +while 1 do + x = 1 + <!x!> = 1 +end +<?x?> = 1 +]] + +TEST [[ +<!x!> = 1 +if 1 then + if 1 then + x = 1 + end +else + if 1 then + <?x?> = 1 + end +end +]] diff --git a/test/implementation/local.lua b/test/implementation/local.lua index 0737443d..7e9b3db0 100644 --- a/test/implementation/local.lua +++ b/test/implementation/local.lua @@ -47,11 +47,11 @@ end ]] TEST [[ -local <!x!> -if x then - local x -elseif <?x?> then - local x +local <!x2!> +if x2 then + local x2 +elseif <?x2?> then + local x2 end ]] |