Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1909 hs.inspect table bug #1910

Closed

Conversation

randomeizer
Copy link
Contributor

Fixes #1909.

hs.inspect = require("hs.inspect")

-- tests the case where a custom __init always returns a new table instance as a key/value
function testInspectAlwaysNewTableKeyValue()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(W111) setting non-standard global variable 'testInspectAlwaysNewTableKeyValue'

-- tests the case where a custom __init always returns a new table instance as a key/value
function testInspectAlwaysNewTableKeyValue()
local t = setmetatable({}, {
__init = function(_, key)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(W212) unused argument 'key'

* Fixed stickler issue
@cmsj
Copy link
Member

cmsj commented Oct 16, 2018

Good work for adding a test, but I think hs.inspect doesn't currently have any tests, so it would need an HSinspect.m in Hammerspoon Tests too I think?

@randomeizer
Copy link
Contributor Author

That would probably help :P I've pushed a fix.

@cmsj cmsj closed this in 50635e7 Dec 8, 2018
@cmsj
Copy link
Member

cmsj commented Dec 8, 2018

Merged with some changes (note that the name of the Lua test function has to match the name in ObjC if RUN_LUA_TEST() is used.

@latenitefilms
Copy link
Contributor

@cmsj - I think maybe something went wrong when you merged this? It seems you merged the test (then commented it out), but didn't actually merge the fix?

@cmsj cmsj reopened this Dec 27, 2018
@cmsj
Copy link
Member

cmsj commented Dec 27, 2018

@latenitefilms it looks to me like the fix from this PR is in inspect/init.lua: https://github.com/Hammerspoon/hammerspoon/blob/master/extensions/inspect/init.lua#L239

So, I'm not sure what I missed?

@latenitefilms
Copy link
Contributor

Opps, apologies, I must have been looking in a wrong branch.

@cmsj cmsj closed this Jan 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants