mirror of
https://github.com/danbulant/nushell
synced 2026-05-21 21:39:15 +00:00
Add subcommand test
This commit is contained in:
parent
273f964293
commit
38fef28c84
2 changed files with 6 additions and 0 deletions
|
|
@ -805,6 +805,7 @@ impl<'a> ParserWorkingSet<'a> {
|
|||
Some(ParseError::UnknownCommand(spans[0])),
|
||||
);
|
||||
}
|
||||
|
||||
let name = self.get_span_contents(spans[pos]);
|
||||
pos += 1;
|
||||
|
||||
|
|
|
|||
|
|
@ -133,3 +133,8 @@ fn env_shorthand() -> TestResult {
|
|||
fn floating_add() -> TestResult {
|
||||
run_test("10.1 + 0.8", "10.9")
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn subcommand() -> TestResult {
|
||||
run_test("def foo [] {}; def \"foo bar\" [] {3}; foo bar", "3")
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue