-
Notifications
You must be signed in to change notification settings - Fork 2.1k
stdlib: the tests do not run using the prelude #8809
Copy link
Copy link
Closed
Labels
A:std-libraryDefining and improving the standard library written in NuDefining and improving the standard library written in Nucategory:enhancementNew feature or requestNew feature or requesttestsissues to add tests or fix testsissues to add tests or fix tests
Milestone
Description
Related problem
the tests of the standard library uses the modules (relative) paths to import required commands, e.e
use std.nu 'assert equal'now, we have a prelude loading thanks to #8627, which loads the help commands from #8505.
things can now be imported from anywhere with
use std ...
Note
we do not need the name of the filestd.nubut only the "abstract" name of the library, i.e.std[
Describe the solution you'd like
i think we should use
use std ...
in the tests not to rely on the filesystem paths.
we also need to mention in the README that, as the library is now embedded in the nu binary, we should run the tests with
cargo run -- crates/nu-std/tests.nu
to avoid using the installed nu which could be quite out of sync 🤔
Describe alternatives you've considered
No response
Additional context and details
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A:std-libraryDefining and improving the standard library written in NuDefining and improving the standard library written in Nucategory:enhancementNew feature or requestNew feature or requesttestsissues to add tests or fix testsissues to add tests or fix tests