File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818 Skip-LuaWhitespace
1919
2020 if ($script :luaPos -ge $script :luaString.Length ) {
21- return $null
21+ throw ' Unexpected end of input '
2222 }
2323
2424 $char = $script :luaString [$script :luaPos ]
Original file line number Diff line number Diff line change @@ -499,6 +499,14 @@ B = { val = 2 }
499499 It ' Throws on unterminated table (missing closing brace)' {
500500 { ConvertFrom-Lua - InputObject ' { a = 1' } | Should - Throw ' *Unterminated*'
501501 }
502+
503+ It ' Throws on whitespace-only input' {
504+ { ConvertFrom-Lua - InputObject ' ' } | Should - Throw ' *Unexpected end of input*'
505+ }
506+
507+ It ' Throws on assignment with missing value' {
508+ { ConvertFrom-Lua - InputObject ' A = ' } | Should - Throw ' *Unexpected end of input*'
509+ }
502510 }
503511
504512 Context ' Pipeline input' {
You can’t perform that action at this time.
0 commit comments