Refactor/fix tests affecting the whole command set (#15073)

# Description
Pre-cratification of `nu-command` we added tests that covered the whole
command set to ensure consistent documentation style choices and that
the search terms which are added are not uselessly redundant. These
tests are now moved into the suite of the main binary to truly cover all
commands.

- **Move parser quickcheck "fuzz" to `nu-cmd-lang`**
- **Factor out creation of full engine state for tests**
- **Move all-command tests to main context creation**
- **Fix all descriptions**
- **Fix search term duplicate**

# User-Facing Changes
As a result I had to fix a few command argument descriptions. (Doesn't
mean I fully stand behind this choice, but) positionals
(rest/required/optional) and top level descriptions should start with a
capital letter and end with a period. This is not enforced for flags.

# Tests + Formatting
Furthermore I moved our poor-peoples-fuzzer that runs in CI with
`quicktest` over the parser to `nu-cmd-lang` reducing its command set to
just the keywords (similar to
https://github.com/nushell/nushell/pull/15036). Thus this should also
run slightly faster (maybe a slight parallel build cost due to earlier
dependency on quicktest)
This commit is contained in:
Stefan Holderbach
2025-02-11 11:36:36 +01:00
committed by GitHub
parent 2a3d5a9d42
commit a58d9b0b3a
36 changed files with 299 additions and 291 deletions

View File

@ -33,7 +33,7 @@ impl Command for PluginAdd {
.required(
"filename",
SyntaxShape::String,
"Path to the executable for the plugin",
"Path to the executable for the plugin.",
)
.category(Category::Plugin)
}

View File

@ -28,7 +28,7 @@ impl Command for PluginRm {
.required(
"name",
SyntaxShape::String,
"The name, or filename, of the plugin to remove",
"The name, or filename, of the plugin to remove.",
)
.category(Category::Plugin)
}

View File

@ -16,7 +16,7 @@ impl Command for PluginStop {
.required(
"name",
SyntaxShape::String,
"The name, or filename, of the plugin to stop",
"The name, or filename, of the plugin to stop.",
)
.category(Category::Plugin)
}

View File

@ -25,7 +25,7 @@ impl Command for PluginUse {
.required(
"name",
SyntaxShape::String,
"The name, or filename, of the plugin to load",
"The name, or filename, of the plugin to load.",
)
.category(Category::Plugin)
}