mirror of
https://github.com/nushell/nushell.git
synced 2024-11-23 00:43:33 +01:00
Add subcommand test
This commit is contained in:
parent
273f964293
commit
38fef28c84
@ -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 New Issue
Block a user