forked from Hammerspoon/hammerspoon
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from sartbimpson/master
Update Hammerspoon base, fix builds, remove updating functionality
- Loading branch information
Showing
52 changed files
with
2,011 additions
and
214 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,56 @@ | ||
-- | ||
-- Globals: | ||
-- These globals can be set and accessed: | ||
-- | ||
globals = { | ||
-- Used by Hammerspoon: | ||
"hs", "rawrequire", "ls", "spoon", | ||
-- Used by Hammerspoon Tests: | ||
"success", "assertIsEqual", | ||
"rawrequire", | ||
} | ||
|
||
-- | ||
-- These globals can only be accessed: | ||
-- | ||
read_globals = { | ||
"hs", | ||
"ls", | ||
"spoon", | ||
} | ||
|
||
-- | ||
-- Hammerspoon Tests: | ||
-- | ||
files["**/test_*.lua"] = { | ||
read_globals = { | ||
"assertFalse", | ||
"assertGreaterThan", | ||
"assertGreaterThanOrEqualTo", | ||
"assertIsAlmostEqual", | ||
"assertIsBoolean", | ||
"assertIsEqual", | ||
"assertIsFunction", | ||
"assertIsNil", | ||
"assertIsNotNil", | ||
"assertIsNumber", | ||
"assertIsString", | ||
"assertIsTable", | ||
"assertIsType", | ||
"assertIsUserdata", | ||
"assertIsUserdataOfType", | ||
"assertLessThan", | ||
"assertLessThanOrEqualTo", | ||
"assertListsEqual", | ||
"assertTableNotEmpty", | ||
"assertTablesEqual", | ||
"assertTrue", | ||
"failure", | ||
"success", | ||
}, | ||
ignore = { | ||
"111" -- Setting an undefined global variable | ||
} | ||
} | ||
|
||
-- | ||
-- Warnings to ignore: | ||
-- | ||
ignore = { | ||
"631" -- Line is too long. | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// | ||
// HSmath.m | ||
// Hammerspoon Tests | ||
// | ||
// Created by Chris Jones on 23/12/2019. | ||
// Copyright © 2019 Hammerspoon. All rights reserved. | ||
// | ||
|
||
#import "HSTestCase.h" | ||
|
||
@interface HSmath : HSTestCase | ||
|
||
@end | ||
|
||
@implementation HSmath | ||
|
||
- (void)setUp { | ||
[super setUpWithRequire:@"test_math"]; | ||
// Put setup code here. This method is called before the invocation of each test method in the class. | ||
} | ||
|
||
- (void)tearDown { | ||
// Put teardown code here. This method is called after the invocation of each test method in the class. | ||
[super tearDown]; | ||
} | ||
|
||
// FIXME: These tests don't really test anything other than the functions exist and don't throw errors | ||
|
||
- (void)testRandomFloat { | ||
RUN_LUA_TEST() | ||
} | ||
|
||
- (void)testRandomFromRange { | ||
RUN_LUA_TEST() | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
Hammerspoon.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded</key> | ||
<false/> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.