TOOLS/nan-test.lua: fix lint warnings

This commit is contained in:
Guido Cella 2024-05-27 23:09:46 +02:00 committed by Kacper Michajłow
parent c12e437d43
commit 5977722adc
2 changed files with 3 additions and 4 deletions

View File

@ -110,7 +110,6 @@ max_line_length = 100
-- TODO: Remove everything below this line
local todo = {
"player/lua/osc.lua",
"TOOLS/lua/nan-test.lua",
"TOOLS/lua/observe-all.lua",
"TOOLS/lua/osd-test.lua",
"TOOLS/lua/status-line.lua",

View File

@ -3,10 +3,10 @@
local utils = require 'mp.utils'
prop_name = "scale-param1"
local prop_name = "scale-param1"
-- internal NaN, return string "default" instead of NaN
v = mp.get_property_native(prop_name, "fail")
local v = mp.get_property_native(prop_name, "fail")
print("Exp:", "string", "\"default\"")
print("Got:", type(v), utils.to_string(v))
@ -25,7 +25,7 @@ print("Exp:", "number", 123)
print("Got:", type(v), utils.to_string(v))
-- try to set an actual NaN
st, msg = mp.set_property_number(prop_name, 0.0/0)
local st, msg = mp.set_property_number(prop_name, 0.0/0)
print("Exp:", nil, "<message>")
print("Got:", st, msg)