2022-06-18 21:56:31 -07:00
|
|
|
pub(crate) use {
|
|
|
|
crate::{
|
2023-01-13 11:03:14 -08:00
|
|
|
assert_stdout::assert_stdout,
|
|
|
|
assert_success::assert_success,
|
|
|
|
tempdir::tempdir,
|
|
|
|
test::{Output, Test},
|
2022-06-18 21:56:31 -07:00
|
|
|
},
|
|
|
|
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,
|
2023-11-21 20:17:38 -08:00
|
|
|
path::{Path, PathBuf, MAIN_SEPARATOR},
|
2023-01-13 11:03:14 -08:00
|
|
|
process::{Command, Stdio},
|
2022-06-18 21:56:31 -07:00
|
|
|
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;
|
2023-11-16 15:51:34 -08:00
|
|
|
mod confirm;
|
2020-10-27 23:51:17 -07:00
|
|
|
mod delimiters;
|
2024-01-11 15:50:04 -08:00
|
|
|
mod directories;
|
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;
|
2023-12-19 20:31:51 -08:00
|
|
|
mod imports;
|
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;
|
2023-12-27 20:27:15 -08:00
|
|
|
mod modules;
|
2022-06-20 17:24:13 -07:00
|
|
|
mod multibyte_char;
|
2023-07-25 02:05:47 -07:00
|
|
|
mod newline_escape;
|
2024-03-26 12:20:46 -07:00
|
|
|
mod no_aliases;
|
2022-11-02 23:37:35 -07:00
|
|
|
mod no_cd;
|
2024-01-09 00:40:08 -08:00
|
|
|
mod no_dependencies;
|
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;
|
2023-01-11 23:06:17 -08:00
|
|
|
mod search_arguments;
|
2023-01-09 16:59:02 -08:00
|
|
|
mod shadowing_parameters;
|
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;
|
2023-12-28 19:06:48 -08:00
|
|
|
mod summary;
|
2021-07-22 00:20:25 -07:00
|
|
|
mod tempdir;
|
2021-10-08 22:04:13 -07:00
|
|
|
mod undefined_variables;
|
2023-10-08 20:47:20 -07:00
|
|
|
mod unstable;
|
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()
|
|
|
|
}
|
|
|
|
}
|
2023-01-12 19:25:28 -08:00
|
|
|
|
|
|
|
fn path_for_regex(s: &str) -> String {
|
|
|
|
if cfg!(windows) {
|
|
|
|
s.replace('/', "\\\\")
|
|
|
|
} else {
|
|
|
|
s.into()
|
|
|
|
}
|
|
|
|
}
|