diff --git a/imports.go b/imports.go index 7b9ae0d..661a606 100644 --- a/imports.go +++ b/imports.go @@ -68,19 +68,18 @@ func (cache *ImportCache) importData(key importCacheKey) *ImportCacheValue { return &val } -func (cache *ImportCache) ImportString(codeDir, importedPath string) (*valueString, error) { +func (cache *ImportCache) ImportString(codeDir, importedPath string, e *evaluator) (*valueString, error) { data := cache.importData(importCacheKey{codeDir, importedPath}) if data.data.err != nil { - return nil, data.data.err + return nil, e.Error(data.data.err.Error()) } - // TODO(sbarzowski) wrap error in runtime error return makeValueString(data.data.content), nil } func (cache *ImportCache) ImportCode(codeDir, importedPath string, e *evaluator) (value, error) { cached := cache.importData(importCacheKey{codeDir, importedPath}) if cached.data.err != nil { - return nil, cached.data.err + return nil, e.Error(cached.data.err.Error()) } if cached.asCode == nil { node, err := snippetToAST(cached.data.foundHere, cached.data.content) @@ -141,6 +140,11 @@ func (importer *FileImporter) Import(dir, importedPath string) *ImportedData { } } + if !found { + return &ImportedData{ + err: fmt.Errorf("Couldn't open import %#v: No match locally or in the Jsonnet library paths.", importedPath), + } + } return &ImportedData{content: string(content), foundHere: foundHere} } diff --git a/interpreter.go b/interpreter.go index 6f10a53..94f5d1a 100644 --- a/interpreter.go +++ b/interpreter.go @@ -370,14 +370,12 @@ func (i *interpreter) evaluate(a ast.Node, context *TraceContext) (value, error) return nil, e.Error(fmt.Sprintf("Value non indexable: %v", reflect.TypeOf(targetValue))) case *ast.Import: - // TODO(sbarzowski) put this information in AST instead of getting it out of tracing data... - codeDir := path.Dir(e.trace.loc.FileName) + codeDir := path.Dir(ast.Loc().FileName) return i.importCache.ImportCode(codeDir, ast.File, e) case *ast.ImportStr: - // TODO(sbarzowski) put this information in AST instead of getting it out of tracing data... - codeDir := path.Dir(e.trace.loc.FileName) - return i.importCache.ImportString(codeDir, ast.File) + codeDir := path.Dir(ast.Loc().FileName) + return i.importCache.ImportString(codeDir, ast.File, e) case *ast.LiteralBoolean: return makeValueBoolean(ast.Value), nil diff --git a/main_test.go b/main_test.go index 62f30d4..ad02162 100644 --- a/main_test.go +++ b/main_test.go @@ -62,15 +62,15 @@ func removeExcessiveWhitespace(s string) string { func TestMain(t *testing.T) { flag.Parse() var mainTests []mainTest - match, err := filepath.Glob("testdata/*.input") + match, err := filepath.Glob("testdata/*.jsonnet") if err != nil { t.Fatal(err) } for _, input := range match { golden := input name := input - if strings.HasSuffix(input, ".input") { - name = input[:len(input)-len(".input")] + if strings.HasSuffix(input, ".jsonnet") { + name = input[:len(input)-len(".jsonnet")] golden = name + ".golden" } mainTests = append(mainTests, mainTest{name: name, input: input, golden: golden}) @@ -106,12 +106,12 @@ func TestMain(t *testing.T) { // TODO(sbarzowski) better reporting of differences in whitespace // missing newline issues can be very subtle now t.Fail() - t.Errorf("Mismatch when running %s.input. Golden: %s\n", test.name, test.golden) + t.Errorf("Mismatch when running %s.jsonnet. Golden: %s\n", test.name, test.golden) data := diff(output, string(golden)) if err != nil { t.Errorf("computing diff: %s", err) } - t.Errorf("diff %s jsonnet %s.input\n", test.golden, test.name) + t.Errorf("diff %s jsonnet %s.jsonnet\n", test.golden, test.name) t.Errorf(string(data)) } diff --git a/testdata/argcapture_builtin_call.input b/testdata/argcapture_builtin_call.jsonnet similarity index 100% rename from testdata/argcapture_builtin_call.input rename to testdata/argcapture_builtin_call.jsonnet diff --git a/testdata/array.input b/testdata/array.jsonnet similarity index 100% rename from testdata/array.input rename to testdata/array.jsonnet diff --git a/testdata/array_index1.input b/testdata/array_index1.jsonnet similarity index 100% rename from testdata/array_index1.input rename to testdata/array_index1.jsonnet diff --git a/testdata/array_index2.input b/testdata/array_index2.jsonnet similarity index 100% rename from testdata/array_index2.input rename to testdata/array_index2.jsonnet diff --git a/testdata/array_index3.input b/testdata/array_index3.jsonnet similarity index 100% rename from testdata/array_index3.input rename to testdata/array_index3.jsonnet diff --git a/testdata/array_index4.input b/testdata/array_index4.jsonnet similarity index 100% rename from testdata/array_index4.input rename to testdata/array_index4.jsonnet diff --git a/testdata/arrcomp.input b/testdata/arrcomp.jsonnet similarity index 100% rename from testdata/arrcomp.input rename to testdata/arrcomp.jsonnet diff --git a/testdata/arrcomp2.input b/testdata/arrcomp2.jsonnet similarity index 100% rename from testdata/arrcomp2.input rename to testdata/arrcomp2.jsonnet diff --git a/testdata/arrcomp3.input b/testdata/arrcomp3.jsonnet similarity index 100% rename from testdata/arrcomp3.input rename to testdata/arrcomp3.jsonnet diff --git a/testdata/arrcomp4.input b/testdata/arrcomp4.jsonnet similarity index 100% rename from testdata/arrcomp4.input rename to testdata/arrcomp4.jsonnet diff --git a/testdata/arrcomp5.input b/testdata/arrcomp5.jsonnet similarity index 100% rename from testdata/arrcomp5.input rename to testdata/arrcomp5.jsonnet diff --git a/testdata/arrcomp_if.input b/testdata/arrcomp_if.jsonnet similarity index 100% rename from testdata/arrcomp_if.input rename to testdata/arrcomp_if.jsonnet diff --git a/testdata/arrcomp_if2.input b/testdata/arrcomp_if2.jsonnet similarity index 100% rename from testdata/arrcomp_if2.input rename to testdata/arrcomp_if2.jsonnet diff --git a/testdata/arrcomp_if3.input b/testdata/arrcomp_if3.jsonnet similarity index 100% rename from testdata/arrcomp_if3.input rename to testdata/arrcomp_if3.jsonnet diff --git a/testdata/arrcomp_if4.input b/testdata/arrcomp_if4.jsonnet similarity index 100% rename from testdata/arrcomp_if4.input rename to testdata/arrcomp_if4.jsonnet diff --git a/testdata/arrcomp_if5.input b/testdata/arrcomp_if5.jsonnet similarity index 100% rename from testdata/arrcomp_if5.input rename to testdata/arrcomp_if5.jsonnet diff --git a/testdata/arrcomp_if6.input b/testdata/arrcomp_if6.jsonnet similarity index 100% rename from testdata/arrcomp_if6.input rename to testdata/arrcomp_if6.jsonnet diff --git a/testdata/arrcomp_if7.input b/testdata/arrcomp_if7.jsonnet similarity index 100% rename from testdata/arrcomp_if7.input rename to testdata/arrcomp_if7.jsonnet diff --git a/testdata/assert.input b/testdata/assert.jsonnet similarity index 100% rename from testdata/assert.input rename to testdata/assert.jsonnet diff --git a/testdata/assert2.input b/testdata/assert2.jsonnet similarity index 100% rename from testdata/assert2.input rename to testdata/assert2.jsonnet diff --git a/testdata/assert3.input b/testdata/assert3.jsonnet similarity index 100% rename from testdata/assert3.input rename to testdata/assert3.jsonnet diff --git a/testdata/assert_equal.input b/testdata/assert_equal.jsonnet similarity index 100% rename from testdata/assert_equal.input rename to testdata/assert_equal.jsonnet diff --git a/testdata/assert_equal2.input b/testdata/assert_equal2.jsonnet similarity index 100% rename from testdata/assert_equal2.input rename to testdata/assert_equal2.jsonnet diff --git a/testdata/assert_equal3.input b/testdata/assert_equal3.jsonnet similarity index 100% rename from testdata/assert_equal3.input rename to testdata/assert_equal3.jsonnet diff --git a/testdata/assert_equal4.input b/testdata/assert_equal4.jsonnet similarity index 100% rename from testdata/assert_equal4.input rename to testdata/assert_equal4.jsonnet diff --git a/testdata/assert_failed.input b/testdata/assert_failed.jsonnet similarity index 100% rename from testdata/assert_failed.input rename to testdata/assert_failed.jsonnet diff --git a/testdata/assert_failed_custom.input b/testdata/assert_failed_custom.jsonnet similarity index 100% rename from testdata/assert_failed_custom.input rename to testdata/assert_failed_custom.jsonnet diff --git a/testdata/binaryNot.input b/testdata/binaryNot.jsonnet similarity index 100% rename from testdata/binaryNot.input rename to testdata/binaryNot.jsonnet diff --git a/testdata/bitwise_and.input b/testdata/bitwise_and.jsonnet similarity index 100% rename from testdata/bitwise_and.input rename to testdata/bitwise_and.jsonnet diff --git a/testdata/bitwise_and2.input b/testdata/bitwise_and2.jsonnet similarity index 100% rename from testdata/bitwise_and2.input rename to testdata/bitwise_and2.jsonnet diff --git a/testdata/bitwise_and3.input b/testdata/bitwise_and3.jsonnet similarity index 100% rename from testdata/bitwise_and3.input rename to testdata/bitwise_and3.jsonnet diff --git a/testdata/bitwise_and4.input b/testdata/bitwise_and4.jsonnet similarity index 100% rename from testdata/bitwise_and4.input rename to testdata/bitwise_and4.jsonnet diff --git a/testdata/bitwise_and5.input b/testdata/bitwise_and5.jsonnet similarity index 100% rename from testdata/bitwise_and5.input rename to testdata/bitwise_and5.jsonnet diff --git a/testdata/bitwise_and6.input b/testdata/bitwise_and6.jsonnet similarity index 100% rename from testdata/bitwise_and6.input rename to testdata/bitwise_and6.jsonnet diff --git a/testdata/bitwise_or.input b/testdata/bitwise_or.jsonnet similarity index 100% rename from testdata/bitwise_or.input rename to testdata/bitwise_or.jsonnet diff --git a/testdata/bitwise_or2.input b/testdata/bitwise_or2.jsonnet similarity index 100% rename from testdata/bitwise_or2.input rename to testdata/bitwise_or2.jsonnet diff --git a/testdata/bitwise_or3.input b/testdata/bitwise_or3.jsonnet similarity index 100% rename from testdata/bitwise_or3.input rename to testdata/bitwise_or3.jsonnet diff --git a/testdata/bitwise_or4.input b/testdata/bitwise_or4.jsonnet similarity index 100% rename from testdata/bitwise_or4.input rename to testdata/bitwise_or4.jsonnet diff --git a/testdata/bitwise_or5.input b/testdata/bitwise_or5.jsonnet similarity index 100% rename from testdata/bitwise_or5.input rename to testdata/bitwise_or5.jsonnet diff --git a/testdata/bitwise_or6.input b/testdata/bitwise_or6.jsonnet similarity index 100% rename from testdata/bitwise_or6.input rename to testdata/bitwise_or6.jsonnet diff --git a/testdata/bitwise_or7.input b/testdata/bitwise_or7.jsonnet similarity index 100% rename from testdata/bitwise_or7.input rename to testdata/bitwise_or7.jsonnet diff --git a/testdata/bitwise_or8.input b/testdata/bitwise_or8.jsonnet similarity index 100% rename from testdata/bitwise_or8.input rename to testdata/bitwise_or8.jsonnet diff --git a/testdata/bitwise_or9.input b/testdata/bitwise_or9.jsonnet similarity index 100% rename from testdata/bitwise_or9.input rename to testdata/bitwise_or9.jsonnet diff --git a/testdata/bitwise_shift.input b/testdata/bitwise_shift.jsonnet similarity index 100% rename from testdata/bitwise_shift.input rename to testdata/bitwise_shift.jsonnet diff --git a/testdata/bitwise_shift2.input b/testdata/bitwise_shift2.jsonnet similarity index 100% rename from testdata/bitwise_shift2.input rename to testdata/bitwise_shift2.jsonnet diff --git a/testdata/bitwise_shift3.input b/testdata/bitwise_shift3.jsonnet similarity index 100% rename from testdata/bitwise_shift3.input rename to testdata/bitwise_shift3.jsonnet diff --git a/testdata/bitwise_shift4.input b/testdata/bitwise_shift4.jsonnet similarity index 100% rename from testdata/bitwise_shift4.input rename to testdata/bitwise_shift4.jsonnet diff --git a/testdata/bitwise_xor.input b/testdata/bitwise_xor.jsonnet similarity index 100% rename from testdata/bitwise_xor.input rename to testdata/bitwise_xor.jsonnet diff --git a/testdata/bitwise_xor2.input b/testdata/bitwise_xor2.jsonnet similarity index 100% rename from testdata/bitwise_xor2.input rename to testdata/bitwise_xor2.jsonnet diff --git a/testdata/bitwise_xor3.input b/testdata/bitwise_xor3.jsonnet similarity index 100% rename from testdata/bitwise_xor3.input rename to testdata/bitwise_xor3.jsonnet diff --git a/testdata/bitwise_xor4.input b/testdata/bitwise_xor4.jsonnet similarity index 100% rename from testdata/bitwise_xor4.input rename to testdata/bitwise_xor4.jsonnet diff --git a/testdata/bitwise_xor5.input b/testdata/bitwise_xor5.jsonnet similarity index 100% rename from testdata/bitwise_xor5.input rename to testdata/bitwise_xor5.jsonnet diff --git a/testdata/bitwise_xor6.input b/testdata/bitwise_xor6.jsonnet similarity index 100% rename from testdata/bitwise_xor6.input rename to testdata/bitwise_xor6.jsonnet diff --git a/testdata/bitwise_xor7.input b/testdata/bitwise_xor7.jsonnet similarity index 100% rename from testdata/bitwise_xor7.input rename to testdata/bitwise_xor7.jsonnet diff --git a/testdata/bitwise_xor8.input b/testdata/bitwise_xor8.jsonnet similarity index 100% rename from testdata/bitwise_xor8.input rename to testdata/bitwise_xor8.jsonnet diff --git a/testdata/bitwise_xor9.input b/testdata/bitwise_xor9.jsonnet similarity index 100% rename from testdata/bitwise_xor9.input rename to testdata/bitwise_xor9.jsonnet diff --git a/testdata/boolean_literal.input b/testdata/boolean_literal.jsonnet similarity index 100% rename from testdata/boolean_literal.input rename to testdata/boolean_literal.jsonnet diff --git a/testdata/builtinChar.input b/testdata/builtinChar.jsonnet similarity index 100% rename from testdata/builtinChar.input rename to testdata/builtinChar.jsonnet diff --git a/testdata/builtinChar2.input b/testdata/builtinChar2.jsonnet similarity index 100% rename from testdata/builtinChar2.input rename to testdata/builtinChar2.jsonnet diff --git a/testdata/builtinChar3.input b/testdata/builtinChar3.jsonnet similarity index 100% rename from testdata/builtinChar3.input rename to testdata/builtinChar3.jsonnet diff --git a/testdata/builtinChar4.input b/testdata/builtinChar4.jsonnet similarity index 100% rename from testdata/builtinChar4.input rename to testdata/builtinChar4.jsonnet diff --git a/testdata/builtinChar5.input b/testdata/builtinChar5.jsonnet similarity index 100% rename from testdata/builtinChar5.input rename to testdata/builtinChar5.jsonnet diff --git a/testdata/builtinChar6.input b/testdata/builtinChar6.jsonnet similarity index 100% rename from testdata/builtinChar6.input rename to testdata/builtinChar6.jsonnet diff --git a/testdata/builtinObjectFieldsEx.input b/testdata/builtinObjectFieldsEx.jsonnet similarity index 100% rename from testdata/builtinObjectFieldsEx.input rename to testdata/builtinObjectFieldsEx.jsonnet diff --git a/testdata/builtinObjectFieldsExWithHidden.input b/testdata/builtinObjectFieldsExWithHidden.jsonnet similarity index 100% rename from testdata/builtinObjectFieldsExWithHidden.input rename to testdata/builtinObjectFieldsExWithHidden.jsonnet diff --git a/testdata/builtinObjectHasEx.input b/testdata/builtinObjectHasEx.jsonnet similarity index 100% rename from testdata/builtinObjectHasEx.input rename to testdata/builtinObjectHasEx.jsonnet diff --git a/testdata/builtinObjectHasExBadField.input b/testdata/builtinObjectHasExBadField.jsonnet similarity index 100% rename from testdata/builtinObjectHasExBadField.input rename to testdata/builtinObjectHasExBadField.jsonnet diff --git a/testdata/builtinObjectHasExBadObject.input b/testdata/builtinObjectHasExBadObject.jsonnet similarity index 100% rename from testdata/builtinObjectHasExBadObject.input rename to testdata/builtinObjectHasExBadObject.jsonnet diff --git a/testdata/builtin_acos.input b/testdata/builtin_acos.jsonnet similarity index 100% rename from testdata/builtin_acos.input rename to testdata/builtin_acos.jsonnet diff --git a/testdata/builtin_asin.input b/testdata/builtin_asin.jsonnet similarity index 100% rename from testdata/builtin_asin.input rename to testdata/builtin_asin.jsonnet diff --git a/testdata/builtin_atan.input b/testdata/builtin_atan.jsonnet similarity index 100% rename from testdata/builtin_atan.input rename to testdata/builtin_atan.jsonnet diff --git a/testdata/builtin_ceil.input b/testdata/builtin_ceil.jsonnet similarity index 100% rename from testdata/builtin_ceil.input rename to testdata/builtin_ceil.jsonnet diff --git a/testdata/builtin_cos.input b/testdata/builtin_cos.jsonnet similarity index 100% rename from testdata/builtin_cos.input rename to testdata/builtin_cos.jsonnet diff --git a/testdata/builtin_exp.input b/testdata/builtin_exp.jsonnet similarity index 100% rename from testdata/builtin_exp.input rename to testdata/builtin_exp.jsonnet diff --git a/testdata/builtin_floor.input b/testdata/builtin_floor.jsonnet similarity index 100% rename from testdata/builtin_floor.input rename to testdata/builtin_floor.jsonnet diff --git a/testdata/builtin_log.input b/testdata/builtin_log.jsonnet similarity index 100% rename from testdata/builtin_log.input rename to testdata/builtin_log.jsonnet diff --git a/testdata/builtin_sin.input b/testdata/builtin_sin.jsonnet similarity index 100% rename from testdata/builtin_sin.input rename to testdata/builtin_sin.jsonnet diff --git a/testdata/builtin_sqrt.input b/testdata/builtin_sqrt.jsonnet similarity index 100% rename from testdata/builtin_sqrt.input rename to testdata/builtin_sqrt.jsonnet diff --git a/testdata/builtin_tan.input b/testdata/builtin_tan.jsonnet similarity index 100% rename from testdata/builtin_tan.input rename to testdata/builtin_tan.jsonnet diff --git a/testdata/call_number.input b/testdata/call_number.jsonnet similarity index 100% rename from testdata/call_number.input rename to testdata/call_number.jsonnet diff --git a/testdata/div1.input b/testdata/div1.jsonnet similarity index 100% rename from testdata/div1.input rename to testdata/div1.jsonnet diff --git a/testdata/div2.input b/testdata/div2.jsonnet similarity index 100% rename from testdata/div2.input rename to testdata/div2.jsonnet diff --git a/testdata/div3.input b/testdata/div3.jsonnet similarity index 100% rename from testdata/div3.input rename to testdata/div3.jsonnet diff --git a/testdata/div4.input b/testdata/div4.jsonnet similarity index 100% rename from testdata/div4.input rename to testdata/div4.jsonnet diff --git a/testdata/div_by_zero.input b/testdata/div_by_zero.jsonnet similarity index 100% rename from testdata/div_by_zero.input rename to testdata/div_by_zero.jsonnet diff --git a/testdata/empty_array.input b/testdata/empty_array.jsonnet similarity index 100% rename from testdata/empty_array.input rename to testdata/empty_array.jsonnet diff --git a/testdata/empty_object.input b/testdata/empty_object.jsonnet similarity index 100% rename from testdata/empty_object.input rename to testdata/empty_object.jsonnet diff --git a/testdata/equals.input b/testdata/equals.jsonnet similarity index 100% rename from testdata/equals.input rename to testdata/equals.jsonnet diff --git a/testdata/error.input b/testdata/error.jsonnet similarity index 100% rename from testdata/error.input rename to testdata/error.jsonnet diff --git a/testdata/error_hexnumber.input b/testdata/error_hexnumber.jsonnet similarity index 100% rename from testdata/error_hexnumber.input rename to testdata/error_hexnumber.jsonnet diff --git a/testdata/escaped_fields.input b/testdata/escaped_fields.jsonnet similarity index 100% rename from testdata/escaped_fields.input rename to testdata/escaped_fields.jsonnet diff --git a/testdata/escaped_single_quote.input b/testdata/escaped_single_quote.jsonnet similarity index 100% rename from testdata/escaped_single_quote.input rename to testdata/escaped_single_quote.jsonnet diff --git a/testdata/false.golden b/testdata/false.golden new file mode 100644 index 0000000..c508d53 --- /dev/null +++ b/testdata/false.golden @@ -0,0 +1 @@ +false diff --git a/testdata/false.jsonnet b/testdata/false.jsonnet new file mode 100644 index 0000000..c508d53 --- /dev/null +++ b/testdata/false.jsonnet @@ -0,0 +1 @@ +false diff --git a/testdata/fieldname_not_string.input b/testdata/fieldname_not_string.jsonnet similarity index 100% rename from testdata/fieldname_not_string.input rename to testdata/fieldname_not_string.jsonnet diff --git a/testdata/filled_thunk.input b/testdata/filled_thunk.jsonnet similarity index 100% rename from testdata/filled_thunk.input rename to testdata/filled_thunk.jsonnet diff --git a/testdata/function.input b/testdata/function.jsonnet similarity index 100% rename from testdata/function.input rename to testdata/function.jsonnet diff --git a/testdata/function_call.input b/testdata/function_call.jsonnet similarity index 100% rename from testdata/function_call.input rename to testdata/function_call.jsonnet diff --git a/testdata/function_capturing.input b/testdata/function_capturing.jsonnet similarity index 100% rename from testdata/function_capturing.input rename to testdata/function_capturing.jsonnet diff --git a/testdata/function_in_object.input b/testdata/function_in_object.jsonnet similarity index 100% rename from testdata/function_in_object.input rename to testdata/function_in_object.jsonnet diff --git a/testdata/function_with_argument.input b/testdata/function_with_argument.jsonnet similarity index 100% rename from testdata/function_with_argument.input rename to testdata/function_with_argument.jsonnet diff --git a/testdata/greater.input b/testdata/greater.jsonnet similarity index 100% rename from testdata/greater.input rename to testdata/greater.jsonnet diff --git a/testdata/greaterEq.input b/testdata/greaterEq.jsonnet similarity index 100% rename from testdata/greaterEq.input rename to testdata/greaterEq.jsonnet diff --git a/testdata/greaterEq2.input b/testdata/greaterEq2.jsonnet similarity index 100% rename from testdata/greaterEq2.input rename to testdata/greaterEq2.jsonnet diff --git a/testdata/ifthen_false.input b/testdata/ifthen_false.jsonnet similarity index 100% rename from testdata/ifthen_false.input rename to testdata/ifthen_false.jsonnet diff --git a/testdata/ifthenelse_false.input b/testdata/ifthenelse_false.jsonnet similarity index 100% rename from testdata/ifthenelse_false.input rename to testdata/ifthenelse_false.jsonnet diff --git a/testdata/ifthenelse_true.input b/testdata/ifthenelse_true.jsonnet similarity index 100% rename from testdata/ifthenelse_true.input rename to testdata/ifthenelse_true.jsonnet diff --git a/testdata/import.golden b/testdata/import.golden new file mode 100644 index 0000000..27ba77d --- /dev/null +++ b/testdata/import.golden @@ -0,0 +1 @@ +true diff --git a/testdata/import.jsonnet b/testdata/import.jsonnet new file mode 100644 index 0000000..aca4aa2 --- /dev/null +++ b/testdata/import.jsonnet @@ -0,0 +1 @@ +import "true.jsonnet" diff --git a/testdata/import2.golden b/testdata/import2.golden new file mode 100644 index 0000000..c508d53 --- /dev/null +++ b/testdata/import2.golden @@ -0,0 +1 @@ +false diff --git a/testdata/import2.jsonnet b/testdata/import2.jsonnet new file mode 100644 index 0000000..f181054 --- /dev/null +++ b/testdata/import2.jsonnet @@ -0,0 +1 @@ +import "false.jsonnet" diff --git a/testdata/import3.golden b/testdata/import3.golden new file mode 100644 index 0000000..1d75bff --- /dev/null +++ b/testdata/import3.golden @@ -0,0 +1 @@ +"true\n" diff --git a/testdata/import3.jsonnet b/testdata/import3.jsonnet new file mode 100644 index 0000000..9288534 --- /dev/null +++ b/testdata/import3.jsonnet @@ -0,0 +1 @@ +importstr "true.jsonnet" diff --git a/testdata/import4.golden b/testdata/import4.golden new file mode 100644 index 0000000..74f5ff2 --- /dev/null +++ b/testdata/import4.golden @@ -0,0 +1 @@ +"false\n" diff --git a/testdata/import4.jsonnet b/testdata/import4.jsonnet new file mode 100644 index 0000000..c1d21df --- /dev/null +++ b/testdata/import4.jsonnet @@ -0,0 +1 @@ +importstr "false.jsonnet" diff --git a/testdata/import_failure_directory.golden b/testdata/import_failure_directory.golden new file mode 100644 index 0000000..b82d4f1 --- /dev/null +++ b/testdata/import_failure_directory.golden @@ -0,0 +1 @@ +RUNTIME ERROR: read testdata: is a directory diff --git a/testdata/import_failure_directory.jsonnet b/testdata/import_failure_directory.jsonnet new file mode 100644 index 0000000..172c063 --- /dev/null +++ b/testdata/import_failure_directory.jsonnet @@ -0,0 +1,3 @@ +// Test for the case when the imported thing exists, but there +// is an error. In this case it's not even a file. +import '.' diff --git a/testdata/lazy.input b/testdata/lazy.jsonnet similarity index 100% rename from testdata/lazy.input rename to testdata/lazy.jsonnet diff --git a/testdata/lazy_operator1.input b/testdata/lazy_operator1.jsonnet similarity index 100% rename from testdata/lazy_operator1.input rename to testdata/lazy_operator1.jsonnet diff --git a/testdata/lazy_operator2.input b/testdata/lazy_operator2.jsonnet similarity index 100% rename from testdata/lazy_operator2.input rename to testdata/lazy_operator2.jsonnet diff --git a/testdata/less.input b/testdata/less.jsonnet similarity index 100% rename from testdata/less.input rename to testdata/less.jsonnet diff --git a/testdata/lessEq.input b/testdata/lessEq.jsonnet similarity index 100% rename from testdata/lessEq.input rename to testdata/lessEq.jsonnet diff --git a/testdata/lessEq2.input b/testdata/lessEq2.jsonnet similarity index 100% rename from testdata/lessEq2.input rename to testdata/lessEq2.jsonnet diff --git a/testdata/local_within_nested_object.input b/testdata/local_within_nested_object.jsonnet similarity index 100% rename from testdata/local_within_nested_object.input rename to testdata/local_within_nested_object.jsonnet diff --git a/testdata/method_call.input b/testdata/method_call.jsonnet similarity index 100% rename from testdata/method_call.input rename to testdata/method_call.jsonnet diff --git a/testdata/modulo.input b/testdata/modulo.jsonnet similarity index 100% rename from testdata/modulo.input rename to testdata/modulo.jsonnet diff --git a/testdata/modulo2.input b/testdata/modulo2.jsonnet similarity index 100% rename from testdata/modulo2.input rename to testdata/modulo2.jsonnet diff --git a/testdata/modulo3.input b/testdata/modulo3.jsonnet similarity index 100% rename from testdata/modulo3.input rename to testdata/modulo3.jsonnet diff --git a/testdata/modulo4.input b/testdata/modulo4.jsonnet similarity index 100% rename from testdata/modulo4.input rename to testdata/modulo4.jsonnet diff --git a/testdata/modulo5.input b/testdata/modulo5.jsonnet similarity index 100% rename from testdata/modulo5.input rename to testdata/modulo5.jsonnet diff --git a/testdata/modulo6.input b/testdata/modulo6.jsonnet similarity index 100% rename from testdata/modulo6.input rename to testdata/modulo6.jsonnet diff --git a/testdata/modulo7.input b/testdata/modulo7.jsonnet similarity index 100% rename from testdata/modulo7.input rename to testdata/modulo7.jsonnet diff --git a/testdata/mult.input b/testdata/mult.jsonnet similarity index 100% rename from testdata/mult.input rename to testdata/mult.jsonnet diff --git a/testdata/mult2.input b/testdata/mult2.jsonnet similarity index 100% rename from testdata/mult2.input rename to testdata/mult2.jsonnet diff --git a/testdata/mult3.input b/testdata/mult3.jsonnet similarity index 100% rename from testdata/mult3.input rename to testdata/mult3.jsonnet diff --git a/testdata/nonexistent_import.golden b/testdata/nonexistent_import.golden new file mode 100644 index 0000000..5145a9d --- /dev/null +++ b/testdata/nonexistent_import.golden @@ -0,0 +1 @@ +RUNTIME ERROR: Couldn't open import "no chance a file with this name exists": No match locally or in the Jsonnet library paths. diff --git a/testdata/nonexistent_import.jsonnet b/testdata/nonexistent_import.jsonnet new file mode 100644 index 0000000..99fefa3 --- /dev/null +++ b/testdata/nonexistent_import.jsonnet @@ -0,0 +1 @@ +importstr 'no chance a file with this name exists' diff --git a/testdata/nonexistent_import_crazy.golden b/testdata/nonexistent_import_crazy.golden new file mode 100644 index 0000000..709c9eb --- /dev/null +++ b/testdata/nonexistent_import_crazy.golden @@ -0,0 +1 @@ +RUNTIME ERROR: Couldn't open import "ąęółńśćźż \\\" \\' \\n\\n\\t\\t": No match locally or in the Jsonnet library paths. diff --git a/testdata/nonexistent_import_crazy.jsonnet b/testdata/nonexistent_import_crazy.jsonnet new file mode 100644 index 0000000..fe6f680 --- /dev/null +++ b/testdata/nonexistent_import_crazy.jsonnet @@ -0,0 +1 @@ +importstr "ąęółńśćźż \" \' \n\n\t\t" diff --git a/testdata/number_leading_zero.input b/testdata/number_leading_zero.jsonnet similarity index 100% rename from testdata/number_leading_zero.input rename to testdata/number_leading_zero.jsonnet diff --git a/testdata/numeric_literal.input b/testdata/numeric_literal.jsonnet similarity index 100% rename from testdata/numeric_literal.input rename to testdata/numeric_literal.jsonnet diff --git a/testdata/object.input b/testdata/object.jsonnet similarity index 100% rename from testdata/object.input rename to testdata/object.jsonnet diff --git a/testdata/object_sum.input b/testdata/object_sum.jsonnet similarity index 100% rename from testdata/object_sum.input rename to testdata/object_sum.jsonnet diff --git a/testdata/object_sum2.input b/testdata/object_sum2.jsonnet similarity index 100% rename from testdata/object_sum2.input rename to testdata/object_sum2.jsonnet diff --git a/testdata/object_sum3.input b/testdata/object_sum3.jsonnet similarity index 100% rename from testdata/object_sum3.input rename to testdata/object_sum3.jsonnet diff --git a/testdata/object_super.input b/testdata/object_super.jsonnet similarity index 100% rename from testdata/object_super.input rename to testdata/object_super.jsonnet diff --git a/testdata/object_super_deep.input b/testdata/object_super_deep.jsonnet similarity index 100% rename from testdata/object_super_deep.input rename to testdata/object_super_deep.jsonnet diff --git a/testdata/object_super_within.input b/testdata/object_super_within.jsonnet similarity index 100% rename from testdata/object_super_within.input rename to testdata/object_super_within.jsonnet diff --git a/testdata/object_within_object.input b/testdata/object_within_object.jsonnet similarity index 100% rename from testdata/object_within_object.input rename to testdata/object_within_object.jsonnet diff --git a/testdata/or.input b/testdata/or.jsonnet similarity index 100% rename from testdata/or.input rename to testdata/or.jsonnet diff --git a/testdata/or2.input b/testdata/or2.jsonnet similarity index 100% rename from testdata/or2.input rename to testdata/or2.jsonnet diff --git a/testdata/or3.input b/testdata/or3.jsonnet similarity index 100% rename from testdata/or3.input rename to testdata/or3.jsonnet diff --git a/testdata/or4.input b/testdata/or4.jsonnet similarity index 100% rename from testdata/or4.input rename to testdata/or4.jsonnet diff --git a/testdata/or5.input b/testdata/or5.jsonnet similarity index 100% rename from testdata/or5.input rename to testdata/or5.jsonnet diff --git a/testdata/or6.input b/testdata/or6.jsonnet similarity index 100% rename from testdata/or6.input rename to testdata/or6.jsonnet diff --git a/testdata/percent_bad.input b/testdata/percent_bad.jsonnet similarity index 100% rename from testdata/percent_bad.input rename to testdata/percent_bad.jsonnet diff --git a/testdata/percent_bad2.input b/testdata/percent_bad2.jsonnet similarity index 100% rename from testdata/percent_bad2.input rename to testdata/percent_bad2.jsonnet diff --git a/testdata/percent_bad3.input b/testdata/percent_bad3.jsonnet similarity index 100% rename from testdata/percent_bad3.input rename to testdata/percent_bad3.jsonnet diff --git a/testdata/percent_format_str.input b/testdata/percent_format_str.jsonnet similarity index 100% rename from testdata/percent_format_str.input rename to testdata/percent_format_str.jsonnet diff --git a/testdata/percent_format_str2.input b/testdata/percent_format_str2.jsonnet similarity index 100% rename from testdata/percent_format_str2.input rename to testdata/percent_format_str2.jsonnet diff --git a/testdata/percent_format_str3.input b/testdata/percent_format_str3.jsonnet similarity index 100% rename from testdata/percent_format_str3.input rename to testdata/percent_format_str3.jsonnet diff --git a/testdata/percent_format_str4.input b/testdata/percent_format_str4.jsonnet similarity index 100% rename from testdata/percent_format_str4.input rename to testdata/percent_format_str4.jsonnet diff --git a/testdata/percent_format_str5.input b/testdata/percent_format_str5.jsonnet similarity index 100% rename from testdata/percent_format_str5.input rename to testdata/percent_format_str5.jsonnet diff --git a/testdata/percent_format_str6.input b/testdata/percent_format_str6.jsonnet similarity index 100% rename from testdata/percent_format_str6.input rename to testdata/percent_format_str6.jsonnet diff --git a/testdata/percent_format_str7.input b/testdata/percent_format_str7.jsonnet similarity index 100% rename from testdata/percent_format_str7.input rename to testdata/percent_format_str7.jsonnet diff --git a/testdata/percent_format_str8.input b/testdata/percent_format_str8.jsonnet similarity index 100% rename from testdata/percent_format_str8.input rename to testdata/percent_format_str8.jsonnet diff --git a/testdata/percent_mod_int.input b/testdata/percent_mod_int.jsonnet similarity index 100% rename from testdata/percent_mod_int.input rename to testdata/percent_mod_int.jsonnet diff --git a/testdata/percent_mod_int2.input b/testdata/percent_mod_int2.jsonnet similarity index 100% rename from testdata/percent_mod_int2.input rename to testdata/percent_mod_int2.jsonnet diff --git a/testdata/percent_mod_int3.input b/testdata/percent_mod_int3.jsonnet similarity index 100% rename from testdata/percent_mod_int3.input rename to testdata/percent_mod_int3.jsonnet diff --git a/testdata/percent_mod_int4.input b/testdata/percent_mod_int4.jsonnet similarity index 100% rename from testdata/percent_mod_int4.input rename to testdata/percent_mod_int4.jsonnet diff --git a/testdata/percent_mod_int5.input b/testdata/percent_mod_int5.jsonnet similarity index 100% rename from testdata/percent_mod_int5.input rename to testdata/percent_mod_int5.jsonnet diff --git a/testdata/percent_mod_int6.input b/testdata/percent_mod_int6.jsonnet similarity index 100% rename from testdata/percent_mod_int6.input rename to testdata/percent_mod_int6.jsonnet diff --git a/testdata/plus.input b/testdata/plus.jsonnet similarity index 100% rename from testdata/plus.input rename to testdata/plus.jsonnet diff --git a/testdata/plus2.input b/testdata/plus2.jsonnet similarity index 100% rename from testdata/plus2.input rename to testdata/plus2.jsonnet diff --git a/testdata/plus3.input b/testdata/plus3.jsonnet similarity index 100% rename from testdata/plus3.input rename to testdata/plus3.jsonnet diff --git a/testdata/plus4.input b/testdata/plus4.jsonnet similarity index 100% rename from testdata/plus4.input rename to testdata/plus4.jsonnet diff --git a/testdata/plus5.input b/testdata/plus5.jsonnet similarity index 100% rename from testdata/plus5.input rename to testdata/plus5.jsonnet diff --git a/testdata/plus6.input b/testdata/plus6.jsonnet similarity index 100% rename from testdata/plus6.input rename to testdata/plus6.jsonnet diff --git a/testdata/plus7.input b/testdata/plus7.jsonnet similarity index 100% rename from testdata/plus7.input rename to testdata/plus7.jsonnet diff --git a/testdata/plus8.input b/testdata/plus8.jsonnet similarity index 100% rename from testdata/plus8.input rename to testdata/plus8.jsonnet diff --git a/testdata/plus9.input b/testdata/plus9.jsonnet similarity index 100% rename from testdata/plus9.input rename to testdata/plus9.jsonnet diff --git a/testdata/pow.input b/testdata/pow.jsonnet similarity index 100% rename from testdata/pow.input rename to testdata/pow.jsonnet diff --git a/testdata/pow2.input b/testdata/pow2.jsonnet similarity index 100% rename from testdata/pow2.input rename to testdata/pow2.jsonnet diff --git a/testdata/pow3.input b/testdata/pow3.jsonnet similarity index 100% rename from testdata/pow3.input rename to testdata/pow3.jsonnet diff --git a/testdata/pow4.input b/testdata/pow4.jsonnet similarity index 100% rename from testdata/pow4.input rename to testdata/pow4.jsonnet diff --git a/testdata/pow5.input b/testdata/pow5.jsonnet similarity index 100% rename from testdata/pow5.input rename to testdata/pow5.jsonnet diff --git a/testdata/pow6.input b/testdata/pow6.jsonnet similarity index 100% rename from testdata/pow6.input rename to testdata/pow6.jsonnet diff --git a/testdata/pow7.input b/testdata/pow7.jsonnet similarity index 100% rename from testdata/pow7.input rename to testdata/pow7.jsonnet diff --git a/testdata/recursive_local.input b/testdata/recursive_local.jsonnet similarity index 100% rename from testdata/recursive_local.input rename to testdata/recursive_local.jsonnet diff --git a/testdata/self.input b/testdata/self.jsonnet similarity index 100% rename from testdata/self.input rename to testdata/self.jsonnet diff --git a/testdata/simple_arith1.input b/testdata/simple_arith1.jsonnet similarity index 100% rename from testdata/simple_arith1.input rename to testdata/simple_arith1.jsonnet diff --git a/testdata/simple_arith2.input b/testdata/simple_arith2.jsonnet similarity index 100% rename from testdata/simple_arith2.input rename to testdata/simple_arith2.jsonnet diff --git a/testdata/simple_arith3.input b/testdata/simple_arith3.jsonnet similarity index 100% rename from testdata/simple_arith3.input rename to testdata/simple_arith3.jsonnet diff --git a/testdata/simple_arith_string.input b/testdata/simple_arith_string.jsonnet similarity index 100% rename from testdata/simple_arith_string.input rename to testdata/simple_arith_string.jsonnet diff --git a/testdata/simple_arith_string2.input b/testdata/simple_arith_string2.jsonnet similarity index 100% rename from testdata/simple_arith_string2.input rename to testdata/simple_arith_string2.jsonnet diff --git a/testdata/simple_arith_string3.input b/testdata/simple_arith_string3.jsonnet similarity index 100% rename from testdata/simple_arith_string3.input rename to testdata/simple_arith_string3.jsonnet diff --git a/testdata/simple_arith_string_empty.input b/testdata/simple_arith_string_empty.jsonnet similarity index 100% rename from testdata/simple_arith_string_empty.input rename to testdata/simple_arith_string_empty.jsonnet diff --git a/testdata/slice.input b/testdata/slice.jsonnet similarity index 100% rename from testdata/slice.input rename to testdata/slice.jsonnet diff --git a/testdata/slice2.input b/testdata/slice2.jsonnet similarity index 100% rename from testdata/slice2.input rename to testdata/slice2.jsonnet diff --git a/testdata/slice3.input b/testdata/slice3.jsonnet similarity index 100% rename from testdata/slice3.input rename to testdata/slice3.jsonnet diff --git a/testdata/slice4.input b/testdata/slice4.jsonnet similarity index 100% rename from testdata/slice4.input rename to testdata/slice4.jsonnet diff --git a/testdata/slice5.input b/testdata/slice5.jsonnet similarity index 100% rename from testdata/slice5.input rename to testdata/slice5.jsonnet diff --git a/testdata/slice6.input b/testdata/slice6.jsonnet similarity index 100% rename from testdata/slice6.input rename to testdata/slice6.jsonnet diff --git a/testdata/slice7.input b/testdata/slice7.jsonnet similarity index 100% rename from testdata/slice7.input rename to testdata/slice7.jsonnet diff --git a/testdata/std.codepoint.input b/testdata/std.codepoint.jsonnet similarity index 100% rename from testdata/std.codepoint.input rename to testdata/std.codepoint.jsonnet diff --git a/testdata/std.codepoint2.input b/testdata/std.codepoint2.jsonnet similarity index 100% rename from testdata/std.codepoint2.input rename to testdata/std.codepoint2.jsonnet diff --git a/testdata/std.codepoint3.input b/testdata/std.codepoint3.jsonnet similarity index 100% rename from testdata/std.codepoint3.input rename to testdata/std.codepoint3.jsonnet diff --git a/testdata/std.codepoint4.input b/testdata/std.codepoint4.jsonnet similarity index 100% rename from testdata/std.codepoint4.input rename to testdata/std.codepoint4.jsonnet diff --git a/testdata/std.codepoint5.input b/testdata/std.codepoint5.jsonnet similarity index 100% rename from testdata/std.codepoint5.input rename to testdata/std.codepoint5.jsonnet diff --git a/testdata/std.codepoint6.input b/testdata/std.codepoint6.jsonnet similarity index 100% rename from testdata/std.codepoint6.input rename to testdata/std.codepoint6.jsonnet diff --git a/testdata/std.codepoint7.input b/testdata/std.codepoint7.jsonnet similarity index 100% rename from testdata/std.codepoint7.input rename to testdata/std.codepoint7.jsonnet diff --git a/testdata/std.exponent.input b/testdata/std.exponent.jsonnet similarity index 100% rename from testdata/std.exponent.input rename to testdata/std.exponent.jsonnet diff --git a/testdata/std.exponent2.input b/testdata/std.exponent2.jsonnet similarity index 100% rename from testdata/std.exponent2.input rename to testdata/std.exponent2.jsonnet diff --git a/testdata/std.exponent3.input b/testdata/std.exponent3.jsonnet similarity index 100% rename from testdata/std.exponent3.input rename to testdata/std.exponent3.jsonnet diff --git a/testdata/std.exponent4.input b/testdata/std.exponent4.jsonnet similarity index 100% rename from testdata/std.exponent4.input rename to testdata/std.exponent4.jsonnet diff --git a/testdata/std.exponent5.input b/testdata/std.exponent5.jsonnet similarity index 100% rename from testdata/std.exponent5.input rename to testdata/std.exponent5.jsonnet diff --git a/testdata/std.exponent6.input b/testdata/std.exponent6.jsonnet similarity index 100% rename from testdata/std.exponent6.input rename to testdata/std.exponent6.jsonnet diff --git a/testdata/std.exponent7.input b/testdata/std.exponent7.jsonnet similarity index 100% rename from testdata/std.exponent7.input rename to testdata/std.exponent7.jsonnet diff --git a/testdata/std.filter.input b/testdata/std.filter.jsonnet similarity index 100% rename from testdata/std.filter.input rename to testdata/std.filter.jsonnet diff --git a/testdata/std.filter2.input b/testdata/std.filter2.jsonnet similarity index 100% rename from testdata/std.filter2.input rename to testdata/std.filter2.jsonnet diff --git a/testdata/std.filter3.input b/testdata/std.filter3.jsonnet similarity index 100% rename from testdata/std.filter3.input rename to testdata/std.filter3.jsonnet diff --git a/testdata/std.filter4.input b/testdata/std.filter4.jsonnet similarity index 100% rename from testdata/std.filter4.input rename to testdata/std.filter4.jsonnet diff --git a/testdata/std.filter5.input b/testdata/std.filter5.jsonnet similarity index 100% rename from testdata/std.filter5.input rename to testdata/std.filter5.jsonnet diff --git a/testdata/std.filter6.input b/testdata/std.filter6.jsonnet similarity index 100% rename from testdata/std.filter6.input rename to testdata/std.filter6.jsonnet diff --git a/testdata/std.filter7.input b/testdata/std.filter7.jsonnet similarity index 100% rename from testdata/std.filter7.input rename to testdata/std.filter7.jsonnet diff --git a/testdata/std.filter_swapped_args.input b/testdata/std.filter_swapped_args.jsonnet similarity index 100% rename from testdata/std.filter_swapped_args.input rename to testdata/std.filter_swapped_args.jsonnet diff --git a/testdata/std.flatmap.input b/testdata/std.flatmap.jsonnet similarity index 100% rename from testdata/std.flatmap.input rename to testdata/std.flatmap.jsonnet diff --git a/testdata/std.flatmap2.input b/testdata/std.flatmap2.jsonnet similarity index 100% rename from testdata/std.flatmap2.input rename to testdata/std.flatmap2.jsonnet diff --git a/testdata/std.flatmap3.input b/testdata/std.flatmap3.jsonnet similarity index 100% rename from testdata/std.flatmap3.input rename to testdata/std.flatmap3.jsonnet diff --git a/testdata/std.flatmap4.input b/testdata/std.flatmap4.jsonnet similarity index 100% rename from testdata/std.flatmap4.input rename to testdata/std.flatmap4.jsonnet diff --git a/testdata/std.flatmap5.input b/testdata/std.flatmap5.jsonnet similarity index 100% rename from testdata/std.flatmap5.input rename to testdata/std.flatmap5.jsonnet diff --git a/testdata/std.input b/testdata/std.jsonnet similarity index 100% rename from testdata/std.input rename to testdata/std.jsonnet diff --git a/testdata/std.length.input b/testdata/std.length.jsonnet similarity index 100% rename from testdata/std.length.input rename to testdata/std.length.jsonnet diff --git a/testdata/std.length_array.input b/testdata/std.length_array.jsonnet similarity index 100% rename from testdata/std.length_array.input rename to testdata/std.length_array.jsonnet diff --git a/testdata/std.length_function.input b/testdata/std.length_function.jsonnet similarity index 100% rename from testdata/std.length_function.input rename to testdata/std.length_function.jsonnet diff --git a/testdata/std.length_object.input b/testdata/std.length_object.jsonnet similarity index 100% rename from testdata/std.length_object.input rename to testdata/std.length_object.jsonnet diff --git a/testdata/std.length_object_sum.input b/testdata/std.length_object_sum.jsonnet similarity index 100% rename from testdata/std.length_object_sum.input rename to testdata/std.length_object_sum.jsonnet diff --git a/testdata/std.length_object_with_hidden.input b/testdata/std.length_object_with_hidden.jsonnet similarity index 100% rename from testdata/std.length_object_with_hidden.input rename to testdata/std.length_object_with_hidden.jsonnet diff --git a/testdata/std.length_string.input b/testdata/std.length_string.jsonnet similarity index 100% rename from testdata/std.length_string.input rename to testdata/std.length_string.jsonnet diff --git a/testdata/std.makeArray.input b/testdata/std.makeArray.jsonnet similarity index 100% rename from testdata/std.makeArray.input rename to testdata/std.makeArray.jsonnet diff --git a/testdata/std.mantissa.input b/testdata/std.mantissa.jsonnet similarity index 100% rename from testdata/std.mantissa.input rename to testdata/std.mantissa.jsonnet diff --git a/testdata/std.mantissa2.input b/testdata/std.mantissa2.jsonnet similarity index 100% rename from testdata/std.mantissa2.input rename to testdata/std.mantissa2.jsonnet diff --git a/testdata/std.mantissa3.input b/testdata/std.mantissa3.jsonnet similarity index 100% rename from testdata/std.mantissa3.input rename to testdata/std.mantissa3.jsonnet diff --git a/testdata/std.mantissa4.input b/testdata/std.mantissa4.jsonnet similarity index 100% rename from testdata/std.mantissa4.input rename to testdata/std.mantissa4.jsonnet diff --git a/testdata/std.mantissa5.input b/testdata/std.mantissa5.jsonnet similarity index 100% rename from testdata/std.mantissa5.input rename to testdata/std.mantissa5.jsonnet diff --git a/testdata/std.mantissa6.input b/testdata/std.mantissa6.jsonnet similarity index 100% rename from testdata/std.mantissa6.input rename to testdata/std.mantissa6.jsonnet diff --git a/testdata/std.mantissa7.input b/testdata/std.mantissa7.jsonnet similarity index 100% rename from testdata/std.mantissa7.input rename to testdata/std.mantissa7.jsonnet diff --git a/testdata/std.md5.input b/testdata/std.md5.jsonnet similarity index 100% rename from testdata/std.md5.input rename to testdata/std.md5.jsonnet diff --git a/testdata/std.md5_2.input b/testdata/std.md5_2.jsonnet similarity index 100% rename from testdata/std.md5_2.input rename to testdata/std.md5_2.jsonnet diff --git a/testdata/std.md5_3.input b/testdata/std.md5_3.jsonnet similarity index 100% rename from testdata/std.md5_3.input rename to testdata/std.md5_3.jsonnet diff --git a/testdata/std.md5_4.input b/testdata/std.md5_4.jsonnet similarity index 100% rename from testdata/std.md5_4.input rename to testdata/std.md5_4.jsonnet diff --git a/testdata/std.md5_5.input b/testdata/std.md5_5.jsonnet similarity index 100% rename from testdata/std.md5_5.input rename to testdata/std.md5_5.jsonnet diff --git a/testdata/std.md5_6.input b/testdata/std.md5_6.jsonnet similarity index 100% rename from testdata/std.md5_6.input rename to testdata/std.md5_6.jsonnet diff --git a/testdata/std.mod_int.input b/testdata/std.mod_int.jsonnet similarity index 100% rename from testdata/std.mod_int.input rename to testdata/std.mod_int.jsonnet diff --git a/testdata/std.mod_string.input b/testdata/std.mod_string.jsonnet similarity index 100% rename from testdata/std.mod_string.input rename to testdata/std.mod_string.jsonnet diff --git a/testdata/std.objectFields.input b/testdata/std.objectFields.jsonnet similarity index 100% rename from testdata/std.objectFields.input rename to testdata/std.objectFields.jsonnet diff --git a/testdata/std.objectHasEx.input b/testdata/std.objectHasEx.jsonnet similarity index 100% rename from testdata/std.objectHasEx.input rename to testdata/std.objectHasEx.jsonnet diff --git a/testdata/std.objectHasEx2.input b/testdata/std.objectHasEx2.jsonnet similarity index 100% rename from testdata/std.objectHasEx2.input rename to testdata/std.objectHasEx2.jsonnet diff --git a/testdata/std.objectHasEx3.input b/testdata/std.objectHasEx3.jsonnet similarity index 100% rename from testdata/std.objectHasEx3.input rename to testdata/std.objectHasEx3.jsonnet diff --git a/testdata/std.objectHasEx4.input b/testdata/std.objectHasEx4.jsonnet similarity index 100% rename from testdata/std.objectHasEx4.input rename to testdata/std.objectHasEx4.jsonnet diff --git a/testdata/std.slice.input b/testdata/std.slice.jsonnet similarity index 100% rename from testdata/std.slice.input rename to testdata/std.slice.jsonnet diff --git a/testdata/std.toString.input b/testdata/std.toString.jsonnet similarity index 100% rename from testdata/std.toString.input rename to testdata/std.toString.jsonnet diff --git a/testdata/std.toString2.input b/testdata/std.toString2.jsonnet similarity index 100% rename from testdata/std.toString2.input rename to testdata/std.toString2.jsonnet diff --git a/testdata/std.toString3.input b/testdata/std.toString3.jsonnet similarity index 100% rename from testdata/std.toString3.input rename to testdata/std.toString3.jsonnet diff --git a/testdata/std.toString4.input b/testdata/std.toString4.jsonnet similarity index 100% rename from testdata/std.toString4.input rename to testdata/std.toString4.jsonnet diff --git a/testdata/std.toString5.input b/testdata/std.toString5.jsonnet similarity index 100% rename from testdata/std.toString5.input rename to testdata/std.toString5.jsonnet diff --git a/testdata/std.toString6.input b/testdata/std.toString6.jsonnet similarity index 100% rename from testdata/std.toString6.input rename to testdata/std.toString6.jsonnet diff --git a/testdata/std.toString7.input b/testdata/std.toString7.jsonnet similarity index 100% rename from testdata/std.toString7.input rename to testdata/std.toString7.jsonnet diff --git a/testdata/std_in_local.input b/testdata/std_in_local.jsonnet similarity index 100% rename from testdata/std_in_local.input rename to testdata/std_in_local.jsonnet diff --git a/testdata/std_substr.input b/testdata/std_substr.jsonnet similarity index 100% rename from testdata/std_substr.input rename to testdata/std_substr.jsonnet diff --git a/testdata/string.input b/testdata/string.jsonnet similarity index 100% rename from testdata/string.input rename to testdata/string.jsonnet diff --git a/testdata/string2.input b/testdata/string2.jsonnet similarity index 100% rename from testdata/string2.input rename to testdata/string2.jsonnet diff --git a/testdata/string_comparison1.input b/testdata/string_comparison1.jsonnet similarity index 100% rename from testdata/string_comparison1.input rename to testdata/string_comparison1.jsonnet diff --git a/testdata/string_comparison2.input b/testdata/string_comparison2.jsonnet similarity index 100% rename from testdata/string_comparison2.input rename to testdata/string_comparison2.jsonnet diff --git a/testdata/string_comparison3.input b/testdata/string_comparison3.jsonnet similarity index 100% rename from testdata/string_comparison3.input rename to testdata/string_comparison3.jsonnet diff --git a/testdata/string_comparison4.input b/testdata/string_comparison4.jsonnet similarity index 100% rename from testdata/string_comparison4.input rename to testdata/string_comparison4.jsonnet diff --git a/testdata/string_comparison5.input b/testdata/string_comparison5.jsonnet similarity index 100% rename from testdata/string_comparison5.input rename to testdata/string_comparison5.jsonnet diff --git a/testdata/string_comparison6.input b/testdata/string_comparison6.jsonnet similarity index 100% rename from testdata/string_comparison6.input rename to testdata/string_comparison6.jsonnet diff --git a/testdata/string_comparison7.input b/testdata/string_comparison7.jsonnet similarity index 100% rename from testdata/string_comparison7.input rename to testdata/string_comparison7.jsonnet diff --git a/testdata/string_index.input b/testdata/string_index.jsonnet similarity index 100% rename from testdata/string_index.input rename to testdata/string_index.jsonnet diff --git a/testdata/string_index2.input b/testdata/string_index2.jsonnet similarity index 100% rename from testdata/string_index2.input rename to testdata/string_index2.jsonnet diff --git a/testdata/string_index_negative.input b/testdata/string_index_negative.jsonnet similarity index 100% rename from testdata/string_index_negative.input rename to testdata/string_index_negative.jsonnet diff --git a/testdata/string_index_out_of_bounds.input b/testdata/string_index_out_of_bounds.jsonnet similarity index 100% rename from testdata/string_index_out_of_bounds.input rename to testdata/string_index_out_of_bounds.jsonnet diff --git a/testdata/true.golden b/testdata/true.golden new file mode 100644 index 0000000..27ba77d --- /dev/null +++ b/testdata/true.golden @@ -0,0 +1 @@ +true diff --git a/testdata/true.jsonnet b/testdata/true.jsonnet new file mode 100644 index 0000000..27ba77d --- /dev/null +++ b/testdata/true.jsonnet @@ -0,0 +1 @@ +true diff --git a/testdata/type_array.input b/testdata/type_array.jsonnet similarity index 100% rename from testdata/type_array.input rename to testdata/type_array.jsonnet diff --git a/testdata/type_builtin_function.input b/testdata/type_builtin_function.jsonnet similarity index 100% rename from testdata/type_builtin_function.input rename to testdata/type_builtin_function.jsonnet diff --git a/testdata/type_error.input b/testdata/type_error.jsonnet similarity index 100% rename from testdata/type_error.input rename to testdata/type_error.jsonnet diff --git a/testdata/type_function.input b/testdata/type_function.jsonnet similarity index 100% rename from testdata/type_function.input rename to testdata/type_function.jsonnet diff --git a/testdata/type_number.input b/testdata/type_number.jsonnet similarity index 100% rename from testdata/type_number.input rename to testdata/type_number.jsonnet diff --git a/testdata/type_object.input b/testdata/type_object.jsonnet similarity index 100% rename from testdata/type_object.input rename to testdata/type_object.jsonnet diff --git a/testdata/type_string.input b/testdata/type_string.jsonnet similarity index 100% rename from testdata/type_string.input rename to testdata/type_string.jsonnet diff --git a/testdata/unfinished_args.input b/testdata/unfinished_args.jsonnet similarity index 100% rename from testdata/unfinished_args.input rename to testdata/unfinished_args.jsonnet diff --git a/testdata/unicode.input b/testdata/unicode.jsonnet similarity index 100% rename from testdata/unicode.input rename to testdata/unicode.jsonnet diff --git a/testdata/unicode2.input b/testdata/unicode2.jsonnet similarity index 100% rename from testdata/unicode2.input rename to testdata/unicode2.jsonnet diff --git a/testdata/use_object.input b/testdata/use_object.jsonnet similarity index 100% rename from testdata/use_object.input rename to testdata/use_object.jsonnet diff --git a/testdata/use_object_in_object.input b/testdata/use_object_in_object.jsonnet similarity index 100% rename from testdata/use_object_in_object.input rename to testdata/use_object_in_object.jsonnet diff --git a/testdata/variable.input b/testdata/variable.jsonnet similarity index 100% rename from testdata/variable.input rename to testdata/variable.jsonnet diff --git a/testdata/variable_not_visible.input b/testdata/variable_not_visible.jsonnet similarity index 100% rename from testdata/variable_not_visible.input rename to testdata/variable_not_visible.jsonnet diff --git a/testdata/verbatim_string.input b/testdata/verbatim_string.jsonnet similarity index 100% rename from testdata/verbatim_string.input rename to testdata/verbatim_string.jsonnet