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

impelement --code-file and --file for parity #110

Merged
merged 1 commit into from
Feb 24, 2016

Conversation

mikedanese
Copy link
Contributor

I was thinking that it would be nice to write a unit test runner that was used like this

$ jsonnet --code-file cases=test_suite/slices.jsonnet stdlib/tests/runner.jsonnet

Prereq is --code-file. @sparkprime I think we talked about this.

$ cat in.jsonnet 
local a = 1;
local b = 2;

a + b
$ jsonnet --code-file cases=in.jsonnet --exec '{cases: std.extVar("cases")}'                                                               
{
   "cases": 3
}
$ jsonnet --file cases=in.jsonnet --exec '{cases: std.extVar("cases")}'                                                                    
{
   "cases": "local a = 1;\nlocal b = 2;\n\na + b\n"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants