just/tests/lib.rs

95 lines
1.6 KiB
Rust
Raw Normal View History

pub(crate) use {
crate::{
assert_stdout::assert_stdout, assert_success::assert_success, tempdir::tempdir, test::Test,
},
cradle::input::Input,
executable_path::executable_path,
just::unindent,
libc::{EXIT_FAILURE, EXIT_SUCCESS},
pretty_assertions::Comparison,
regex::Regex,
serde_json::{json, Value},
std::{
collections::BTreeMap,
env::{self, consts::EXE_SUFFIX},
error::Error,
fmt::Debug,
fs,
io::Write,
iter,
path::{Path, PathBuf, MAIN_SEPARATOR},
process::{Command, Output, Stdio},
str,
},
tempfile::TempDir,
temptree::{temptree, tree, Tree},
which::which,
};
#[macro_use]
mod test;
2022-02-14 18:37:06 -08:00
mod allow_duplicate_recipes;
2021-07-03 14:26:59 -07:00
mod assert_stdout;
mod assert_success;
mod attributes;
mod byte_order_mark;
2021-07-31 13:53:27 -07:00
mod changelog;
mod choose;
2021-05-09 20:35:35 -07:00
mod command;
mod completions;
mod conditional;
mod delimiters;
mod dotenv;
mod edit;
2021-10-01 18:37:28 -07:00
mod equals;
mod error_messages;
mod evaluate;
mod examples;
mod export;
2023-01-03 22:31:56 -08:00
mod fallback;
2021-06-08 01:01:27 -07:00
mod fmt;
mod functions;
mod ignore_comments;
mod init;
#[cfg(unix)]
mod interrupts;
mod invocation_directory;
2021-11-17 00:07:48 -08:00
mod json;
mod line_prefixes;
mod misc;
mod multibyte_char;
2022-11-02 23:37:35 -07:00
mod no_cd;
mod no_exit_message;
mod os_attributes;
mod parser;
mod positional_arguments;
mod private;
mod quiet;
mod quote;
mod readme;
mod recursion_limit;
mod regexes;
mod run;
mod search;
mod shadowing_parameters;
mod shebang;
mod shell;
mod show;
2022-06-25 02:39:06 -07:00
mod slash_operator;
mod string;
mod subsequents;
mod tempdir;
mod undefined_variables;
2022-01-18 11:02:15 -08:00
#[cfg(target_family = "windows")]
2022-05-31 13:01:59 -07:00
mod windows_shell;
mod working_directory;
2023-01-03 22:31:56 -08:00
fn path(s: &str) -> String {
if cfg!(windows) {
s.replace('/', "\\")
} else {
s.into()
}
}