forked from extern/nushell
The original intent of this patch was to remove more unwraps to reduce panics. I then lost a ton of time to the fact that the playground isn't in a temp directory (because of permissions issues on Windows). This commit improves the test facilities to: - use a tempdir for the playground - change the playground API so you instantiate it with a block that encloses the lifetime of the tempdir - the block is called with a `dirs` argument that has `dirs.test()` and other important directories that we were computing by hand all the time - the block is also called with a `playground` argument that you can use to construct files (it's the same `Playground` as before) - change the nu! and nu_error! macros to produce output instead of taking a variable binding - change the nu! and nu_error! macros to do the cwd() transformation internally - change the nu! and nu_error! macros to take varargs at the end that get interpolated into the running command I didn't manage to finish porting all of the tests, so a bunch of tests are currently commented out. That will need to change before we land this patch.
42 lines
1.1 KiB
Rust
42 lines
1.1 KiB
Rust
#![feature(crate_visibility_modifier)]
|
|
#![feature(in_band_lifetimes)]
|
|
#![feature(generators)]
|
|
#![feature(try_trait)]
|
|
#![feature(bind_by_move_pattern_guards)]
|
|
#![feature(specialization)]
|
|
#![feature(proc_macro_hygiene)]
|
|
|
|
#[macro_use]
|
|
mod prelude;
|
|
|
|
mod cli;
|
|
mod commands;
|
|
mod context;
|
|
mod env;
|
|
mod errors;
|
|
mod evaluate;
|
|
mod format;
|
|
mod git;
|
|
mod object;
|
|
mod parser;
|
|
mod plugin;
|
|
mod shell;
|
|
mod stream;
|
|
mod traits;
|
|
mod utils;
|
|
|
|
pub use crate::commands::command::{CallInfo, ReturnSuccess, ReturnValue};
|
|
pub use crate::context::{SourceMap, SpanSource};
|
|
pub use crate::env::host::BasicHost;
|
|
pub use crate::object::base::OF64;
|
|
pub use crate::parser::hir::SyntaxType;
|
|
pub use crate::plugin::{serve_plugin, Plugin};
|
|
pub use crate::utils::{AbsoluteFile, AbsolutePath, RelativePath};
|
|
pub use cli::cli;
|
|
pub use errors::ShellError;
|
|
pub use object::base::{Primitive, Value};
|
|
pub use object::dict::{Dictionary, TaggedDictBuilder};
|
|
pub use object::meta::{Span, Tag, Tagged, TaggedItem};
|
|
pub use parser::parse::text::Text;
|
|
pub use parser::registry::{EvaluatedArgs, NamedType, PositionalType, Signature};
|