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
84 CodeLocation {84 CodeLocation {
85 line: 1,85 line: 1,
86 column: 1,86 column: 1,
87 line_start_offset: 0,87 line_start_offset: 1,
88 line_end_offset: 1188 line_end_offset: 11
89 },89 },
90 CodeLocation {90 CodeLocation {
91 line: 2,91 line: 2,
92 column: 3,92 column: 3,
93 line_start_offset: 11,93 line_start_offset: 12,
94 line_end_offset: 6794 line_end_offset: 67
95 }95 }
96 ]96 ]
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 }