git.delta.rocks / jrsonnet / refs/commits / cfd7ffef0b97

difftreelog

test fixes for latest updates

Лач2020-06-27parent: #65d5493.patch.diff
in: master

2 files changed

modifiedcmds/jrsonnet/src/location.rsdiffbeforeafterboth
--- a/cmds/jrsonnet/src/location.rs
+++ b/cmds/jrsonnet/src/location.rs
@@ -84,13 +84,13 @@
 				CodeLocation {
 					line: 1,
 					column: 1,
-					line_start_offset: 0,
+					line_start_offset: 1,
 					line_end_offset: 11
 				},
 				CodeLocation {
 					line: 2,
 					column: 3,
-					line_start_offset: 11,
+					line_start_offset: 12,
 					line_end_offset: 67
 				}
 			]
modifiedcrates/jsonnet-evaluator/src/lib.rsdiffbeforeafterboth
390 ($str: expr) => {{390 ($str: expr) => {{
391 let evaluator = EvaluationState::default();391 let evaluator = EvaluationState::default();
392 evaluator.with_stdlib();392 evaluator.with_stdlib();
393 evaluator393 evaluator.run_in_state(||{
394 evaluator
394 .parse_evaluate_raw($str)395 .parse_evaluate_raw($str)
395 .unwrap()396 .unwrap()
396 .into_json(0)397 .into_json(0)
397 .unwrap()398 .unwrap()
398 .replace("\n", "")399 .replace("\n", "")
400 })
399 }};401 }}
400 }402 }
401403
402 /// Asserts given code returns `true`404 /// Asserts given code returns `true`
500 }502 }
501503
502 #[test]504 #[test]
505 #[should_panic]
503 fn tailstrict_args() {506 fn tailstrict_args() {
504 eval!("local test(a) = 2; test(error '3') tailstrict");507 eval!("local test(a) = 2; test(error '3') tailstrict");
505 }508 }
506509
507 #[test]510 #[test]
511 #[should_panic]
508 fn no_binding_error() {512 fn no_binding_error() {
509 eval!("a");513 eval!("a");
510 }514 }