mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 07:05:47 +02:00
remove the deprecated register
command (#13297)
# Description This PR removes the `register` command which has been [deprecated](https://www.nushell.sh/blog/2024-04-30-nushell_0_93_0.html#register-toc) in favor of [`plugin add`](https://www.nushell.sh/blog/2024-04-30-nushell_0_93_0.html#redesigned-plugin-management-commands-toc) # User-Facing Changes `register` is no longer available
This commit is contained in:
@ -572,39 +572,6 @@ fn unbalanced_parens2() -> TestResult {
|
||||
fail_test(r#"("("))"#, "unbalanced ( and )")
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn register_with_string_literal() -> TestResult {
|
||||
fail_test(r#"register 'nu-plugin-math'"#, "File not found")
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn register_with_string_constant() -> TestResult {
|
||||
let input = "\
|
||||
const file = 'nu-plugin-math'
|
||||
register $file
|
||||
";
|
||||
// should not fail with `not a constant`
|
||||
fail_test(input, "File not found")
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn register_with_string_variable() -> TestResult {
|
||||
let input = "\
|
||||
let file = 'nu-plugin-math'
|
||||
register $file
|
||||
";
|
||||
fail_test(input, "Value is not a parse-time constant")
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn register_with_non_string_constant() -> TestResult {
|
||||
let input = "\
|
||||
const file = 6
|
||||
register $file
|
||||
";
|
||||
fail_test(input, "expected string, found int")
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn plugin_use_with_string_literal() -> TestResult {
|
||||
fail_test(
|
||||
|
Reference in New Issue
Block a user