mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 05:24:56 +02:00
Add an alias denylist for expansions (#4871)
This commit is contained in:
@ -44,7 +44,13 @@ pub fn test_dataframe(cmds: Vec<Box<dyn Command + 'static>>) {
|
||||
|
||||
let (block, delta) = {
|
||||
let mut working_set = StateWorkingSet::new(&*engine_state);
|
||||
let (output, err) = parse(&mut working_set, None, example.example.as_bytes(), false);
|
||||
let (output, err) = parse(
|
||||
&mut working_set,
|
||||
None,
|
||||
example.example.as_bytes(),
|
||||
false,
|
||||
&[],
|
||||
);
|
||||
|
||||
if let Some(err) = err {
|
||||
panic!("test parse error in `{}`: {:?}", example.example, err)
|
||||
|
@ -84,7 +84,13 @@ pub fn test_examples(cmd: impl Command + 'static) {
|
||||
|
||||
let (block, delta) = {
|
||||
let mut working_set = StateWorkingSet::new(&*engine_state);
|
||||
let (output, err) = parse(&mut working_set, None, example.example.as_bytes(), false);
|
||||
let (output, err) = parse(
|
||||
&mut working_set,
|
||||
None,
|
||||
example.example.as_bytes(),
|
||||
false,
|
||||
&[],
|
||||
);
|
||||
|
||||
if let Some(err) = err {
|
||||
panic!("test parse error in `{}`: {:?}", example.example, err)
|
||||
|
@ -89,7 +89,7 @@ impl Command for FromNuon {
|
||||
let (lite_block, err) = nu_parser::lite_parse(&lexed);
|
||||
error = error.or(err);
|
||||
|
||||
let (mut block, err) = nu_parser::parse_block(&mut working_set, &lite_block, true);
|
||||
let (mut block, err) = nu_parser::parse_block(&mut working_set, &lite_block, true, &[]);
|
||||
error = error.or(err);
|
||||
|
||||
if let Some(pipeline) = block.pipelines.get(1) {
|
||||
|
@ -19,7 +19,7 @@ fn quickcheck_parse(data: String) -> bool {
|
||||
let mut working_set = StateWorkingSet::new(&context);
|
||||
working_set.add_file("quickcheck".into(), data.as_bytes());
|
||||
|
||||
let _ = nu_parser::parse_block(&mut working_set, &lite_block, false);
|
||||
let _ = nu_parser::parse_block(&mut working_set, &lite_block, false, &[]);
|
||||
}
|
||||
}
|
||||
true
|
||||
|
Reference in New Issue
Block a user