-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cirrus module: exposed some Starlib builtins and added an env dict (#96)
* Expose {http,hash,json,yaml} Starlib's modules through cirrus.* * Larker now accepts an environment that gets exposed through cirrus.env * Move Cirrus-provided builtin loading to Loader.loadCirrusModule() * Expose base64, re and zipfile Starlib modules
- Loading branch information
Showing
8 changed files
with
300 additions
and
12 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
load("cirrus", "env") | ||
|
||
def main(ctx): | ||
test_env() | ||
|
||
return [] | ||
|
||
def test_env(): | ||
variable_name = "SOME_VARIABLE" | ||
expected = "some value" | ||
got = env.get(variable_name) | ||
if got == None or got != expected: | ||
fail("expected %s environment variable to be equal to %s, but got %s instead" % (variable_name, expected, got)) |
Oops, something went wrong.