From c598cd4255244178f93b06c70474036c3167919d Mon Sep 17 00:00:00 2001 From: Jonathan Turner Date: Mon, 18 Nov 2019 06:38:44 +1300 Subject: [PATCH] Fix tests --- src/parser/hir/baseline_parse/tests.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/parser/hir/baseline_parse/tests.rs b/src/parser/hir/baseline_parse/tests.rs index c930fbe56c..6ca653c1b2 100644 --- a/src/parser/hir/baseline_parse/tests.rs +++ b/src/parser/hir/baseline_parse/tests.rs @@ -1,12 +1,13 @@ use crate::commands::classified::InternalCommand; use crate::commands::ClassifiedCommand; use crate::env::host::BasicHost; -use crate::parser::hir; use crate::parser::hir::syntax_shape::*; use crate::parser::hir::TokensIterator; +use crate::parser::hir::{self, named::NamedValue, NamedArguments}; use crate::parser::parse::token_tree_builder::{CurriedToken, TokenTreeBuilder as b}; use crate::parser::TokenNode; use crate::{HasSpan, Span, SpannedItem, Tag, Text}; +use indexmap::IndexMap; use pretty_assertions::assert_eq; use std::fmt::Debug; @@ -67,6 +68,9 @@ fn test_parse_command() { eprintln!("{:?} {:?} {:?}", bare, pat, bare.until(pat)); + let mut map = IndexMap::new(); + map.insert("full".to_string(), NamedValue::AbsentSwitch); + ClassifiedCommand::Internal(InternalCommand::new( "ls".to_string(), Tag { @@ -76,7 +80,7 @@ fn test_parse_command() { hir::Call { head: Box::new(hir::RawExpression::Command(bare).spanned(bare)), positional: Some(vec![hir::Expression::pattern("*.txt", pat)]), - named: None, + named: Some(NamedArguments { named: map }), } .spanned(bare.until(pat)), ))