Improve external output in subexprs (#294)

This commit is contained in:
JT
2021-11-06 18:50:33 +13:00
committed by GitHub
parent c7d159a0f3
commit 02b8027749
50 changed files with 320 additions and 136 deletions

View File

@ -2,7 +2,7 @@ use nu_engine::eval_block;
use nu_parser::parse;
use nu_protocol::{
engine::{Command, EngineState, Stack, StateWorkingSet},
PipelineData,
PipelineData, Span,
};
use crate::To;
@ -56,10 +56,15 @@ pub fn test_examples(cmd: impl Command + 'static) {
let mut stack = Stack::new();
match eval_block(&engine_state, &mut stack, &block, PipelineData::new()) {
match eval_block(
&engine_state,
&mut stack,
&block,
PipelineData::new(Span::unknown()),
) {
Err(err) => panic!("test eval error in `{}`: {:?}", example.example, err),
Ok(result) => {
let result = result.into_value();
let result = result.into_value(Span::unknown());
println!("input: {}", example.example);
println!("result: {:?}", result);
println!("done: {:?}", start.elapsed());