2022-06-18 21:56:31 -07:00
|
|
|
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,
|
|
|
|
};
|
|
|
|
|
2020-09-17 19:43:04 -07:00
|
|
|
#[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;
|
2022-10-31 00:52:03 -07:00
|
|
|
mod attributes;
|
2021-11-04 21:35:57 -07:00
|
|
|
mod byte_order_mark;
|
2021-07-31 13:53:27 -07:00
|
|
|
mod changelog;
|
2020-09-17 19:43:04 -07:00
|
|
|
mod choose;
|
2021-05-09 20:35:35 -07:00
|
|
|
mod command;
|
2020-09-17 17:59:46 -07:00
|
|
|
mod completions;
|
2020-10-26 18:16:42 -07:00
|
|
|
mod conditional;
|
2020-10-27 23:51:17 -07:00
|
|
|
mod delimiters;
|
2020-09-17 17:59:46 -07:00
|
|
|
mod dotenv;
|
|
|
|
mod edit;
|
2021-10-01 18:37:28 -07:00
|
|
|
mod equals;
|
2020-10-26 18:16:42 -07:00
|
|
|
mod error_messages;
|
2021-04-05 21:17:53 -07:00
|
|
|
mod evaluate;
|
2020-09-17 17:59:46 -07:00
|
|
|
mod examples;
|
2021-03-25 17:00:32 -07:00
|
|
|
mod export;
|
2023-01-03 22:31:56 -08:00
|
|
|
mod fallback;
|
2021-06-08 01:01:27 -07:00
|
|
|
mod fmt;
|
2021-06-24 23:41:20 -07:00
|
|
|
mod functions;
|
2022-10-04 17:32:30 -07:00
|
|
|
mod ignore_comments;
|
2020-09-17 17:59:46 -07:00
|
|
|
mod init;
|
2022-06-18 21:56:31 -07:00
|
|
|
#[cfg(unix)]
|
2020-09-17 17:59:46 -07:00
|
|
|
mod interrupts;
|
|
|
|
mod invocation_directory;
|
2021-11-17 00:07:48 -08:00
|
|
|
mod json;
|
2022-01-02 16:51:22 -08:00
|
|
|
mod line_prefixes;
|
2020-09-17 17:59:46 -07:00
|
|
|
mod misc;
|
2022-06-20 17:24:13 -07:00
|
|
|
mod multibyte_char;
|
2022-11-02 23:37:35 -07:00
|
|
|
mod no_cd;
|
2022-10-25 16:32:36 -07:00
|
|
|
mod no_exit_message;
|
2022-10-31 00:52:03 -07:00
|
|
|
mod os_attributes;
|
2022-09-10 15:19:49 -07:00
|
|
|
mod parser;
|
2021-04-24 18:29:58 -07:00
|
|
|
mod positional_arguments;
|
2022-11-22 16:25:57 -08:00
|
|
|
mod private;
|
2021-03-25 16:51:29 -07:00
|
|
|
mod quiet;
|
2021-11-08 11:22:58 -08:00
|
|
|
mod quote;
|
2020-09-17 17:59:46 -07:00
|
|
|
mod readme;
|
2022-06-22 15:00:13 -07:00
|
|
|
mod recursion_limit;
|
2021-09-16 16:45:56 -07:00
|
|
|
mod regexes;
|
2022-05-03 22:04:55 -07:00
|
|
|
mod run;
|
2020-09-17 17:59:46 -07:00
|
|
|
mod search;
|
2021-05-11 12:21:49 -07:00
|
|
|
mod shebang;
|
2020-09-17 17:59:46 -07:00
|
|
|
mod shell;
|
2021-07-26 01:26:06 -07:00
|
|
|
mod show;
|
2022-06-25 02:39:06 -07:00
|
|
|
mod slash_operator;
|
2021-04-04 16:41:02 -07:00
|
|
|
mod string;
|
2021-07-22 00:20:25 -07:00
|
|
|
mod subsequents;
|
|
|
|
mod tempdir;
|
2021-10-08 22:04:13 -07:00
|
|
|
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;
|
2020-09-17 17:59:46 -07:00
|
|
|
mod working_directory;
|
2023-01-03 22:31:56 -08:00
|
|
|
|
|
|
|
fn path(s: &str) -> String {
|
|
|
|
if cfg!(windows) {
|
|
|
|
s.replace('/', "\\")
|
|
|
|
} else {
|
|
|
|
s.into()
|
|
|
|
}
|
|
|
|
}
|