use {
  crate::{
    assert_stdout::assert_stdout,
    assert_success::assert_success,
    tempdir::tempdir,
    test::{Output, Test, assert_eval_eq},
  },
  just::{Response, unindent},
  pretty_assertions::Comparison,
  regex::Regex,
  serde::{Deserialize, Serialize},
  serde_json::{Value, json},
  std::{
    collections::BTreeMap,
    env::{self, consts::EXE_SUFFIX},
    error::Error,
    fmt::Debug,
    fs,
    io::Write,
    iter,
    path::{MAIN_SEPARATOR, MAIN_SEPARATOR_STR, Path, PathBuf},
    process::{Command, Stdio},
    str, thread,
    time::{Duration, Instant},
  },
  tempfile::TempDir,
  temptree::{Tree, temptree, tree},
  which::which,
};

const JUST: &str = env!("CARGO_BIN_EXE_just");

fn default<T: Default>() -> T {
  Default::default()
}

#[macro_use]
mod test;

mod alias;
mod alias_style;
mod allow_duplicate_recipes;
mod allow_duplicate_variables;
mod allow_missing;
mod arg_attribute;
mod assert_stdout;
mod assert_success;
mod assertions;
mod assignment;
mod attributes;
mod backticks;
mod byte_order_mark;
mod ceiling;
mod changelog;
mod choose;
mod command;
mod completions;
mod conditional;
mod confirm;
mod constants;
mod datetime;
mod default;
mod delimiters;
mod dependencies;
mod directories;
mod dotenv;
mod dump;
mod edit;
mod equals;
mod error_messages;
mod evaluate;
mod examples;
mod explain;
mod export;
mod fallback;
mod format;
mod format_string;
mod function_definitions;
mod functions;
#[cfg(unix)]
mod global;
mod groups;
mod guards;
mod ignore_comments;
mod imports;
mod init;
mod interpolation;
mod invocation_directory;
mod json;
mod justfile_from_stdin;
mod lazy;
mod line_prefixes;
mod list;
mod logical_operators;
mod man;
mod misc;
mod modules;
mod multibyte_char;
mod newline_escape;
mod no_aliases;
mod no_cd;
mod no_dependencies;
mod no_exit_message;
#[cfg(target_os = "linux")]
mod non_unicode;
mod options;
mod os_attributes;
mod overrides;
mod parallel;
mod parameters;
mod parser;
mod positional_arguments;
mod private;
mod quiet;
mod quote;
mod readme;
mod recursion_limit;
mod regexes;
mod request;
mod resolve;
mod run;
mod scope;
mod script;
mod search;
mod search_arguments;
mod settings;
mod shadowing_parameters;
mod shebang;
mod shell;
mod shell_expansion;
mod show;
#[cfg(unix)]
mod signals;
mod slash_operator;
mod string;
mod subsequents;
mod summary;
mod tempdir;
mod timestamps;
mod undefined_variables;
mod unexport;
mod unstable;
mod usage;
mod which_function;
#[cfg(windows)]
mod windows;
#[cfg(target_family = "windows")]
mod windows_shell;
mod working_directory;

fn path(s: &str) -> String {
  if cfg!(windows) {
    s.replace('/', "\\")
  } else {
    s.into()
  }
}

fn path_for_regex(s: &str) -> String {
  if cfg!(windows) {
    s.replace('/', "\\\\")
  } else {
    s.into()
  }
}
