forked from extern/nushell
05f1b41275
Should close #8616. Related to #8590. # Description With the new builtin `match` command introduced in the `rust` source in #8590, there is no need to have a custom `match` in the standard library. This PR removes the `match` command from `std.nu` and the associated test. # User-Facing Changes Users can not access `match` from `std.nu`. # Tests + Formatting ``` nu crates/nu-utils/standard_library/tests.nu --path crates/nu-utils/standard_library/ out+err> /dev/null; ($env.LAST_EXIT_CODE == 0) ``` gives `true` # After Submitting ``` $nothing ```
25 lines
605 B
Plaintext
25 lines
605 B
Plaintext
use std.nu
|
|
|
|
export def test_path_add [] {
|
|
use std.nu "assert equal"
|
|
|
|
with-env [PATH []] {
|
|
assert equal $env.PATH []
|
|
|
|
std path add "/foo/"
|
|
assert equal $env.PATH ["/foo/"]
|
|
|
|
std path add "/bar/" "/baz/"
|
|
assert equal $env.PATH ["/bar/", "/baz/", "/foo/"]
|
|
|
|
let-env PATH = []
|
|
|
|
std path add "foo"
|
|
std path add "bar" "baz" --append
|
|
assert equal $env.PATH ["foo", "bar", "baz"]
|
|
|
|
assert equal (std path add "fooooo" --ret) ["fooooo", "foo", "bar", "baz"]
|
|
assert equal $env.PATH ["fooooo", "foo", "bar", "baz"]
|
|
}
|
|
}
|