mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-31 20:31:19 -03:00
Adopt the Rust test builtin
This switches the builtin test implementation from C++ to Rust
This commit is contained in:
@@ -183,6 +183,7 @@ pub fn run_builtin(
|
||||
RustBuiltin::Random => super::random::random(parser, streams, args),
|
||||
RustBuiltin::Realpath => super::realpath::realpath(parser, streams, args),
|
||||
RustBuiltin::Return => super::r#return::r#return(parser, streams, args),
|
||||
RustBuiltin::Test => super::test::test(parser, streams, args),
|
||||
RustBuiltin::Type => super::r#type::r#type(parser, streams, args),
|
||||
RustBuiltin::Wait => wait::wait(parser, streams, args),
|
||||
RustBuiltin::Printf => printf::printf(parser, streams, args),
|
||||
|
||||
@@ -562,6 +562,9 @@ static maybe_t<RustBuiltin> try_get_rust_builtin(const wcstring &cmd) {
|
||||
if (cmd == L"realpath") {
|
||||
return RustBuiltin::Realpath;
|
||||
}
|
||||
if (cmd == L"test" || cmd == L"[") {
|
||||
return RustBuiltin::Test;
|
||||
}
|
||||
if (cmd == L"type") {
|
||||
return RustBuiltin::Type;
|
||||
}
|
||||
|
||||
@@ -127,6 +127,7 @@ enum class RustBuiltin : int32_t {
|
||||
Random,
|
||||
Realpath,
|
||||
Return,
|
||||
Test,
|
||||
Type,
|
||||
Wait,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user