forked from extern/nushell
add the standard help
to the prelude as std help ...
(#8794)
Related to #8505. # Description as #8505 has been landed, this PR fixes the prelude TODO and uses the `help` commands from the standard library in the prelude. # User-Facing Changes can now access `std help ...` to use the `help` implementations from the standard library # Tests + Formatting ``` $nothing ``` # After Submitting ``` $nothing ```
This commit is contained in:
@ -10,26 +10,15 @@ fn library_loaded() -> TestResult {
|
||||
|
||||
#[test]
|
||||
fn prelude_loaded() -> TestResult {
|
||||
run_test(
|
||||
"help assert | lines | first 1 | to text",
|
||||
"Universal assert command",
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn prelude_run() -> TestResult {
|
||||
run_test("assert true; print 'it works'", "it works")
|
||||
run_test("std help commands | where name == open | length", "1")
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn not_loaded() -> TestResult {
|
||||
fail_test("help log info", "")
|
||||
fail_test("log info", "")
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn use_command() -> TestResult {
|
||||
run_test(
|
||||
"use std 'log info'; log info 'this is some information'",
|
||||
"",
|
||||
)
|
||||
run_test("use std assert; assert true; print 'it works'", "it works")
|
||||
}
|
||||
|
Reference in New Issue
Block a user