mirror of
https://github.com/nushell/nushell.git
synced 2025-08-15 21:07:51 +02:00
Revert PRs for 0.99.1 patch (#14119)
# Description Temporarily reverts PRs merged after the 0.99.1 bump.
This commit is contained in:
@ -37,7 +37,7 @@ fn plugin_add_then_restart_nu() {
|
||||
--config $nu.config-path
|
||||
--env-config $nu.env-path
|
||||
--plugin-config $nu.plugin-path
|
||||
--commands 'plugin list --engine | get name | to json --raw'
|
||||
--commands 'plugin list | get name | to json --raw'
|
||||
)
|
||||
", example_plugin_path().display())
|
||||
);
|
||||
@ -69,7 +69,7 @@ fn plugin_add_in_nu_plugin_dirs_const() {
|
||||
--config $nu.config-path
|
||||
--env-config $nu.env-path
|
||||
--plugin-config $nu.plugin-path
|
||||
--commands 'plugin list --engine | get name | to json --raw'
|
||||
--commands 'plugin list | get name | to json --raw'
|
||||
)
|
||||
"#,
|
||||
dirname.display(),
|
||||
@ -103,7 +103,7 @@ fn plugin_add_in_nu_plugin_dirs_env() {
|
||||
--config $nu.config-path
|
||||
--env-config $nu.env-path
|
||||
--plugin-config $nu.plugin-path
|
||||
--commands 'plugin list --engine | get name | to json --raw'
|
||||
--commands 'plugin list | get name | to json --raw'
|
||||
)
|
||||
"#,
|
||||
dirname.display(),
|
||||
@ -199,7 +199,7 @@ fn plugin_rm_then_restart_nu() {
|
||||
"--plugin-config",
|
||||
"test-plugin-file.msgpackz",
|
||||
"--commands",
|
||||
"plugin list --engine | get name | to json --raw",
|
||||
"plugin list | get name | to json --raw",
|
||||
])
|
||||
.assert()
|
||||
.success()
|
||||
@ -364,7 +364,7 @@ fn warning_on_invalid_plugin_item() {
|
||||
"--plugin-config",
|
||||
"test-plugin-file.msgpackz",
|
||||
"--commands",
|
||||
"plugin list --engine | get name | to json --raw",
|
||||
"plugin list | get name | to json --raw",
|
||||
])
|
||||
.output()
|
||||
.expect("failed to run nu");
|
||||
@ -412,43 +412,6 @@ fn plugin_use_error_not_found() {
|
||||
})
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn plugin_shows_up_in_default_plugin_list_after_add() {
|
||||
let example_plugin_path = example_plugin_path();
|
||||
let result = nu_with_plugins!(
|
||||
cwd: ".",
|
||||
plugins: [],
|
||||
&format!(r#"
|
||||
plugin add '{}'
|
||||
plugin list | get status | to json --raw
|
||||
"#, example_plugin_path.display())
|
||||
);
|
||||
assert!(result.status.success());
|
||||
assert_eq!(r#"["added"]"#, result.out);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn plugin_shows_removed_after_removing() {
|
||||
let example_plugin_path = example_plugin_path();
|
||||
let result = nu_with_plugins!(
|
||||
cwd: ".",
|
||||
plugins: [],
|
||||
&format!(r#"
|
||||
plugin add '{}'
|
||||
plugin list | get status | to json --raw
|
||||
(
|
||||
^$nu.current-exe
|
||||
--config $nu.config-path
|
||||
--env-config $nu.env-path
|
||||
--plugin-config $nu.plugin-path
|
||||
--commands 'plugin rm example; plugin list | get status | to json --raw'
|
||||
)
|
||||
"#, example_plugin_path.display())
|
||||
);
|
||||
assert!(result.status.success());
|
||||
assert_eq!(r#"["removed"]"#, result.out);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn plugin_add_and_then_use() {
|
||||
let example_plugin_path = example_plugin_path();
|
||||
@ -462,7 +425,7 @@ fn plugin_add_and_then_use() {
|
||||
--config $nu.config-path
|
||||
--env-config $nu.env-path
|
||||
--plugin-config $nu.plugin-path
|
||||
--commands 'plugin use example; plugin list --engine | get name | to json --raw'
|
||||
--commands 'plugin use example; plugin list | get name | to json --raw'
|
||||
)
|
||||
"#, example_plugin_path.display())
|
||||
);
|
||||
@ -483,7 +446,7 @@ fn plugin_add_and_then_use_by_filename() {
|
||||
--config $nu.config-path
|
||||
--env-config $nu.env-path
|
||||
--plugin-config $nu.plugin-path
|
||||
--commands 'plugin use '{0}'; plugin list --engine | get name | to json --raw'
|
||||
--commands 'plugin use '{0}'; plugin list | get name | to json --raw'
|
||||
)
|
||||
"#, example_plugin_path.display())
|
||||
);
|
||||
@ -508,7 +471,7 @@ fn plugin_add_then_use_with_custom_path() {
|
||||
cwd: dirs.test(),
|
||||
r#"
|
||||
plugin use --plugin-config test-plugin-file.msgpackz example
|
||||
plugin list --engine | get name | to json --raw
|
||||
plugin list | get name | to json --raw
|
||||
"#
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user