forked from extern/nushell
Fix command_type classification (#7074)
- Custom commands are true for builtin and custom - Add classification as external command - Specify wildcard in keyword: keyword is true for builtin and keyword
This commit is contained in:
@ -99,6 +99,8 @@ impl Command for Let {
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use nu_protocol::engine::CommandType;
|
||||
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
@ -107,4 +109,9 @@ mod test {
|
||||
|
||||
test_examples(Let {})
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_command_type() {
|
||||
assert!(matches!(Let.command_type(), CommandType::Keyword));
|
||||
}
|
||||
}
|
||||
|
@ -292,6 +292,9 @@ pub fn process(
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
|
||||
use nu_protocol::engine::CommandType;
|
||||
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
@ -300,4 +303,9 @@ mod test {
|
||||
|
||||
test_examples(Sort {})
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_command_type() {
|
||||
assert!(matches!(Sort.command_type(), CommandType::Builtin));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user