2022-06-19 07:56:31 +03:00
|
|
|
pub(crate) use {
|
|
|
|
crate::{
|
2023-01-13 22:03:14 +03:00
|
|
|
assert_stdout::assert_stdout,
|
|
|
|
assert_success::assert_success,
|
|
|
|
tempdir::tempdir,
|
2024-05-19 02:12:11 +03:00
|
|
|
test::{assert_eval_eq, Output, Test},
|
2022-06-19 07:56:31 +03:00
|
|
|
},
|
|
|
|
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,
|
2024-07-09 01:38:25 +03:00
|
|
|
path::{Path, PathBuf, MAIN_SEPARATOR, MAIN_SEPARATOR_STR},
|
2023-01-13 22:03:14 +03:00
|
|
|
process::{Command, Stdio},
|
2022-06-19 07:56:31 +03:00
|
|
|
str,
|
|
|
|
},
|
|
|
|
tempfile::TempDir,
|
|
|
|
temptree::{temptree, tree, Tree},
|
|
|
|
which::which,
|
|
|
|
};
|
|
|
|
|
2020-09-18 05:43:04 +03:00
|
|
|
#[macro_use]
|
|
|
|
mod test;
|
|
|
|
|
2022-02-15 05:37:06 +03:00
|
|
|
mod allow_duplicate_recipes;
|
2024-05-15 04:39:42 +03:00
|
|
|
mod allow_duplicate_variables;
|
2021-07-04 00:26:59 +03:00
|
|
|
mod assert_stdout;
|
|
|
|
mod assert_success;
|
2024-05-15 04:55:32 +03:00
|
|
|
mod assertions;
|
2022-10-31 10:52:03 +03:00
|
|
|
mod attributes;
|
2024-05-15 02:30:19 +03:00
|
|
|
mod backticks;
|
2021-11-05 07:35:57 +03:00
|
|
|
mod byte_order_mark;
|
2021-07-31 23:53:27 +03:00
|
|
|
mod changelog;
|
2020-09-18 05:43:04 +03:00
|
|
|
mod choose;
|
2021-05-10 06:35:35 +03:00
|
|
|
mod command;
|
2020-09-18 03:59:46 +03:00
|
|
|
mod completions;
|
2020-10-27 04:16:42 +03:00
|
|
|
mod conditional;
|
2023-11-17 02:51:34 +03:00
|
|
|
mod confirm;
|
2024-05-19 02:12:11 +03:00
|
|
|
mod constants;
|
2024-06-15 08:48:34 +03:00
|
|
|
mod datetime;
|
2020-10-28 09:51:17 +03:00
|
|
|
mod delimiters;
|
2024-01-12 02:50:04 +03:00
|
|
|
mod directories;
|
2020-09-18 03:59:46 +03:00
|
|
|
mod dotenv;
|
|
|
|
mod edit;
|
2021-10-02 04:37:28 +03:00
|
|
|
mod equals;
|
2020-10-27 04:16:42 +03:00
|
|
|
mod error_messages;
|
2021-04-06 07:17:53 +03:00
|
|
|
mod evaluate;
|
2020-09-18 03:59:46 +03:00
|
|
|
mod examples;
|
2021-03-26 03:00:32 +03:00
|
|
|
mod export;
|
2023-01-04 09:31:56 +03:00
|
|
|
mod fallback;
|
2021-06-08 11:01:27 +03:00
|
|
|
mod fmt;
|
2021-06-25 09:41:20 +03:00
|
|
|
mod functions;
|
2024-05-19 12:29:13 +03:00
|
|
|
#[cfg(unix)]
|
|
|
|
mod global;
|
2024-05-25 10:32:25 +03:00
|
|
|
mod groups;
|
2022-10-05 03:32:30 +03:00
|
|
|
mod ignore_comments;
|
2023-12-20 07:31:51 +03:00
|
|
|
mod imports;
|
2020-09-18 03:59:46 +03:00
|
|
|
mod init;
|
2022-06-19 07:56:31 +03:00
|
|
|
#[cfg(unix)]
|
2020-09-18 03:59:46 +03:00
|
|
|
mod interrupts;
|
|
|
|
mod invocation_directory;
|
2021-11-17 11:07:48 +03:00
|
|
|
mod json;
|
2022-01-03 03:51:22 +03:00
|
|
|
mod line_prefixes;
|
2024-05-20 10:25:18 +03:00
|
|
|
mod list;
|
2024-05-15 10:28:50 +03:00
|
|
|
mod man;
|
2020-09-18 03:59:46 +03:00
|
|
|
mod misc;
|
2023-12-28 07:27:15 +03:00
|
|
|
mod modules;
|
2022-06-21 03:24:13 +03:00
|
|
|
mod multibyte_char;
|
2023-07-25 12:05:47 +03:00
|
|
|
mod newline_escape;
|
2024-03-26 22:20:46 +03:00
|
|
|
mod no_aliases;
|
2022-11-03 09:37:35 +03:00
|
|
|
mod no_cd;
|
2024-01-09 11:40:08 +03:00
|
|
|
mod no_dependencies;
|
2022-10-26 02:32:36 +03:00
|
|
|
mod no_exit_message;
|
2022-10-31 10:52:03 +03:00
|
|
|
mod os_attributes;
|
2022-09-11 01:19:49 +03:00
|
|
|
mod parser;
|
2021-04-25 04:29:58 +03:00
|
|
|
mod positional_arguments;
|
2022-11-23 03:25:57 +03:00
|
|
|
mod private;
|
2021-03-26 02:51:29 +03:00
|
|
|
mod quiet;
|
2021-11-08 22:22:58 +03:00
|
|
|
mod quote;
|
2020-09-18 03:59:46 +03:00
|
|
|
mod readme;
|
2022-06-23 01:00:13 +03:00
|
|
|
mod recursion_limit;
|
2021-09-17 02:45:56 +03:00
|
|
|
mod regexes;
|
2022-05-04 08:04:55 +03:00
|
|
|
mod run;
|
2020-09-18 03:59:46 +03:00
|
|
|
mod search;
|
2023-01-12 10:06:17 +03:00
|
|
|
mod search_arguments;
|
2023-01-10 03:59:02 +03:00
|
|
|
mod shadowing_parameters;
|
2021-05-11 22:21:49 +03:00
|
|
|
mod shebang;
|
2020-09-18 03:59:46 +03:00
|
|
|
mod shell;
|
2024-05-19 08:41:38 +03:00
|
|
|
mod shell_expansion;
|
2021-07-26 11:26:06 +03:00
|
|
|
mod show;
|
2022-06-25 12:39:06 +03:00
|
|
|
mod slash_operator;
|
2021-04-05 02:41:02 +03:00
|
|
|
mod string;
|
2021-07-22 10:20:25 +03:00
|
|
|
mod subsequents;
|
2023-12-29 06:06:48 +03:00
|
|
|
mod summary;
|
2021-07-22 10:20:25 +03:00
|
|
|
mod tempdir;
|
2024-05-29 06:31:55 +03:00
|
|
|
mod timestamps;
|
2021-10-09 08:04:13 +03:00
|
|
|
mod undefined_variables;
|
2024-06-05 23:16:47 +03:00
|
|
|
mod unexport;
|
2023-10-09 06:47:20 +03:00
|
|
|
mod unstable;
|
2024-06-13 22:19:22 +03:00
|
|
|
#[cfg(windows)]
|
|
|
|
mod windows;
|
2022-01-18 22:02:15 +03:00
|
|
|
#[cfg(target_family = "windows")]
|
2022-05-31 23:01:59 +03:00
|
|
|
mod windows_shell;
|
2020-09-18 03:59:46 +03:00
|
|
|
mod working_directory;
|
2023-01-04 09:31:56 +03:00
|
|
|
|
|
|
|
fn path(s: &str) -> String {
|
|
|
|
if cfg!(windows) {
|
|
|
|
s.replace('/', "\\")
|
|
|
|
} else {
|
|
|
|
s.into()
|
|
|
|
}
|
|
|
|
}
|
2023-01-13 06:25:28 +03:00
|
|
|
|
|
|
|
fn path_for_regex(s: &str) -> String {
|
|
|
|
if cfg!(windows) {
|
|
|
|
s.replace('/', "\\\\")
|
|
|
|
} else {
|
|
|
|
s.into()
|
|
|
|
}
|
|
|
|
}
|